Need help with diagonal animations


#1

So Im doing a small test with movement. It works perfectly in 4 directions, but when I try to move diagonally, the animation freezes. Im pretty sure its because two animations are cancelling each other out.


#2

You need to add an event that checks both the conditions in the same event. You can then set the animation of your choice in the actions.


#3

I don’t really know how to do that, do I just use a bunch of “And” conditions?


#4

You need to use something similar to this

Then you can set the action to change the animation.

PS. I don’t think using the “And” condition would harm you but it would be unnecessary to do so


#5

you are right by default all the events in the same “line” must be true to run the second part


#6

The animations still freeze. I read another topic with the exact problem, and the solution was to use variables to keep track of the last key pressed. But I have no idea how to do that either.


#7

Nvm, I fixed this with a bunch of inverted conditions: