Change animations of enemies

I’m currently making a top-down adventure game and I’m breaking my brain on this one.
I have a bunch of ‘enemies’ with pathfinding behaviour and sometimes I spawn them and tell, through events, to follow the player. So far, so good. The problem is, I can’t figure out how to change the animations of these enemies depending on their movement (4 animations - left, right, up and down; I’m not allowing diagonal movement). Is there any way to do that?
In short, I’d like to, if the enemy is moving to right, change enemy animation to B; if it’s moving left, change enemy animation to C and so on.

Thank you!!

You should be comparing the X and Y position of the object to the players position, and changing it based upon that.
The specific conditions are under “Common conditions for all objects/Position”

Try experimenting with this.

If you look into the plat former example it will show you how to do this. Let me know after you have had a look if you have any questions.