Hello, I am in serious confusion how to do this thing… Like i did a success changing the animation from walk to run using player’s speed. But something off…Walking To Running
Click on Walking To Running to see video.
As you can see in the video the player’s running animation doesn’t play at all. It only plays when i release the key(all though i didn’t set it in the events)… This is the problem.
I think the main problem with your events is that in the second block within the red frame you take the ‘maximum horizontal speed’ but instead you need to use ‘the current horizontal speed’
The first block in the red frame is a bit strange. You could set the maximum horizontal speed of your player at the beginning of the scene and your player won’t be faster than that value (The default maximum speed of the platformer object is 250 and it cannot be changed in the behavior menu).
You have an inverted “player is moving” event in which the maximum horizontal speed is set to 250. So if your player is not moving why is it necessary to change the maximum horizontal speed?
You also have to add an event that sets the animation back to walking when the current horizontal speed is less than 350 (otherwise the player will keep the run animation).
Nah, finally fixed it. All i had to do was like, when the left or right key is pressed
And while the player’s maximum speed is this then change the animation and it worked!