spacer graphic
spacer graphic
Montage of games AGS Logo
spacer graphic

 

spacer graphic
Menu
spacer graphic Home
About
News
Features
Download AGS
spacer graphic Games 
Games main page
Award Winners
Picks of the month
Short games
Medium length games
Full length games
In Production
Hints & Tips
Community
Forums
AGSers World Map
Member websites
Chat
Resources
Tutorials
FAQ
Knowledge Base
Downloads
Links
AGS-related links
* AGS Manual
  * Scripting
    * Character functions and properties

Walk

(Formerly known as MoveCharacter, which is now obsolete)
(Formerly known as MoveCharacterBlocking, which is now obsolete)
(Formerly known as MoveCharacterDirect, which is now obsolete)

Character.Walk(int x, int y, optional BlockingStyle,
                             optional WalkWhere);
Starts the character moving from its current location to (X,Y), whilst playing his walking animation.

If blocking is eNoBlock (the default) then control returns to the script immediately, and the character will move in the background.

If blocking is eBlock then this command will wait for the character to finish moving before your script resumes.

If walkWhere is eWalkableAreas (the default), then the character will attempt to get as close a possible to (X,Y) by using the room's walkable areas.

If walkWhere is eAnywhere, then the character will simply walk directly from its current location to (X,Y), ignoring the room walkable areas.

If you don't want the character's walking animation to play, you can use the Move command instead.

NOTE: this function only works with characters which are on the current screen.

NOTE: if you need to find out when the character has reached its destination, use the Moving property. See the variables section for more information.

Example:

cEgo.Walk(155, 122, eBlock);
will make the character walk to 155,122. The script will not continue until the character has reached his destination.

See Also: Character.AddWaypoint, Character.FaceCharacter, Character.Move, MoveCharacterToObject, Object.Move, Character.StopMoving


User comments and notes
There are currently no user comments on this page.
The user comment facility is currently disabled.