(Formerly known as MoveObject, which is now obsolete)
(Formerly known as MoveObjectDirect, which is now obsolete)
Object.Move(int x, int y, int speed, optional BlockingStyle,
optional WalkWhere);
Starts the 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 AGS Editor.
If BlockingStyle is eNoBlock (the default), then control returns to the script
immediately, and the object will move in the background.
If BlockingStyle is eBlock then this command will wait for the object
to finish moving before your script resumes.
If WalkWhere is eWalkableAreas (the default), then the object will attempt to
get as close a possible to (X,Y) by using the room's walkable areas.
If WalkWhere is eAnywhere, then the object will simply walk directly from its
current location to (X,Y), ignoring the room walkable areas.
Example:
object[2].Move(125, 40, 4, eBlock);
will move object 2 to 125,40 and return control to the player when the object gets there.
See Also: Object.Moving, Character.Walk,
Object.StopMoving
|