How do you move a object?

Started by Jimmy, Fri 16/01/2004 02:57:27

Previous topic - Next topic

Jimmy

How do you move a object without making the game busy?

Wolfgang Abenteuer

#1
MoveObject and MoveObjectDirect are both non-blocking functions.  Was there something else you needed it to do?  ???

~Wolfgang

Jimmy

sorry. how do you move a CHARACTER.

Wolfgang Abenteuer

MoveCharacter, MoveCharacterDirect, and MoveCharacterPath are also non-blocking.

~Wolfgang

Jimmy


Wolfgang Abenteuer

Uh...it shouldn't.  MoveCharacterBlocking should be the only one that blocks.  By "blocking", you mean the game changes to the Wait cursor and you can't do any interactions, right?  Are you trying to move the player character or someone else?

~Wolfgang

Ishmael

#6


MoveObject
MoveObject (int object, int x, int y, int speed)

Starts the object OBJECT moving from its current location to (X,Y). It will move at speed SPEED, which uses the same scale as the character Walk Speed values in the Room Editor.
Example:

MoveObject(2,125,40,4);
while (IsObjectMoving(2)==1) Wait(1);

will move object 2 to 125,40 and return control to the player when the object gets there.




It shouldn't block, unless ou have used the specific code used as example in the manual.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

SMF spam blocked by CleanTalk