I’m wondering how to animate player’s diagonal movement with the top down behavior?
My character moves in the eight directions but the animation freezes when I hold down two buttons at once. I tried to change the animation for when two buttons are held down at once but the freezing continues. I’m sure it’s a simple thing, I just haven’t figured out.
Your current event sheet won’t work for 2 reasons:
You have animations for S key is pressed
You have animations for D key is pressed
You have animations for S AND D key is pressed, which will directly conflict with the above two.
You will either need to:
Add a “key is pressed” that is inverted for EVERY other directional key
or
Add some kind of “keys pressed” global variable that increases for each key pressed, and decreases for each key released, and set up the 1 key pressed animations to only work when that variable is 1, and the combo key presses to only work when that variable is two.
Edit: Also, separate your animation from your movement entirely. Either with sub events or duplicating the conditions. Your animations need to have conditions of “Trigger once” otherwise they’ll restart every single frame.