Is there a new SetMoveSpeed?

Started by WanderingWizard, Wed 03/11/2021 03:41:59

Previous topic - Next topic

WanderingWizard

I'm trying to get a character to run out of the room, but it turns out AGS doesn't recognize SetMoveSpeed anymore. Is there a modern equivalent?

EDIT: Nobody's answered this yet, so let me try to get a twofer in... in addition to that, why does animate have you set a loop number? The animation is the character extending his hand to shake, which needs to be done toward the player character. I want the loop played to be based on which direction the character is facing. How does that work?

Gilbert

From the manual, it is Character.SetWalkSpeed.

Quote from: WanderingWizard on Wed 03/11/2021 03:41:59
I want the loop played to be based on which direction the character is facing. How does that work?

That's because the animation function was not designed to have the animation depend on which direction the character is facing, otherwise you must fill all the loops with frames (even if you want to use only one set of sprites for a certain animation). If you have a View with animated frames matching all the directions I think you can do the following (not tested):
Code: ags

player.Animate(player.Loop, 1); 

SMF spam blocked by CleanTalk