Basic Sprite Movement

I’m not a professional dev, but I have made a nearly complete game. Due to engine reasons, I’m having to try and recreate the whole thing on a new engine and I thought GDev would be good.

I cannot for the life of me figure out how to do a simple enemy patrol route. I have the U, D, L, R animations, but cannot figure out how to implement them. Player Character is fine because then I can tie the animations to key use, but I cannot figure out how to do a simple “If [Enemy] is moving/facing U/D/L/R” then “Use [X] animation.” TopDown and Pathfinding are sending me in circles. All I get is stupid rotation. And somehow I have to do randomized movement (dog chasing sheep), too.

Edit: This is not a platformer.

I cannot get past what should be the easiest part of development. Seriously, what is this?
(Apologies if I do not reply right away; my internet is spotty and sometimes nonexistent.)

This thread helped me a lot with my npc pieces.
(Solved) Pathfinding animation problem in 8 directions - How do I…? - GDevelop Forum

Unfortunately for me I’m using a different sort of movement than pathfinding but I was still able to use the formula to make it into something workable in my game. If you are using regular pathfinding you can probably get all your answers here.

@Keith_1357 has always helped me with my pathfinding questions and I consider him something of a pathfinding genius, considering his amazing samples and work he’s done with it. He can surely provide more knowledge for you if you still have questions.

1 Like