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

SetWalkSpeed

(Formerly known as SetCharacterSpeed, which is now obsolete)
(Formerly known as SetCharacterSpeedEx, which is now obsolete)

Character.SetWalkSpeed(int x_speed, int y_speed)

Changes the character to have a walking speed of X_SPEED in the horizontal direction and Y_SPEED in the vertical direction. The values used for X_SPEED and Y_SPEED are identical to those set in the AGS Editor for walking speed.

X_SPEED and Y_SPEED can be identical, in which case the character moves with the same speed in any direction. (the editor calls this "Uniform movement speed")

NOTE: This function CANNOT be called while the character is moving, so you must stop him first.

Example:

cEgo.SetWalkSpeed(10, 10);
will change the character EGO's speed to 10.

See Also: Character.AnimationSpeed, Character.StopMoving, Character.Walk, Character.WalkSpeedX, Character.WalkSpeedY


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