(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
|