How do i create diagonal movement animations


I can’t figure out how to create a diagonal animation. Every time i try and create an event that says “when a and s keys are pressed, play diagonal animation,” the character goes diagonal, but the animation just freezes. Can someone help me? I am a beginner to gdevelop btw.

Hi, are you using Top-Down movement behaviour?
The reason why it’s pausing is because it checks that the S key is pressed, so it sets the animation to “walkforward”, then immediately it checks that a key is pressed, so it begins the animation “walkleft”, from the beginning frame. It goes back and forth between walkforward and walkleft everytime.
You can create a condition that checks for both keys to be pressed, or refer to this thread, where OP instead checks the direction the player is moving:

Cat knows what they’re talking about, I think the writer of that thread has some great ideas

As an aside, if you’re having continued problems, I seem to be able to solve most of my issues with a textbox by putting it in my game window, and setting the text to whatever I need. So for my thread, I was setting the text of my textbox to ToString(8 + round(GameObject.TopDownMovement::Angle()/45)), and getting -3, -4 and -5 if I recall correctly, then going into the game, moving around and observing the behaviour