Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Tyshalle on Wed 27/11/2013 22:05:07

Title: Changing Character Movement Speed?
Post by: Tyshalle on Wed 27/11/2013 22:05:07
Is there a quick and easy way to change a character's movement speed? I have a scripted sequence where I just want a character to run out of the room, while the rest of the game they'd be walking, but I can't seem to figure out how to get it to work.
Title: Re: Changing Character Movement Speed?
Post by: Slasher on Wed 27/11/2013 22:42:45
Hi,

You can use SetWalkSpeed

Example:
Code (ags) Select

player.StopMoving(); // player is your character and must stop moving before applying new speed.
player.SetWalkSpeed(5, 5);// players new walkspeed, both numbers to be the same. The higher the number the faster speed.

You may also want to check out: player.AnimationSpeed