RTS click and move system

Hello there. Trying to create a rts. I just finished my “art workflow” to render 3 animations in 8 directions sprites.
Now i struggle to find a solid way to create a rts clik and move thing
The player will move multiple units separately and each unit will show the right animation (8 directions isometric top down style)
Any clue hints advices plz?

Hello,

A for each event to start, then a variable object on your unit, to store the coords where it should move to. After it depends on a lot of parameters, you can move your units with force, or impulse(physics behavior), or pathfinding mouvement to the coords.

Here is a basic logic advice, i hope this will help.

A lot of the pathfinding examples are basically RTS controls.

Check all pathfinding examples here: https://gdevelop-app.com/game-examples-starters/

i tried pathfinding movement and now it works like a charm. (didn’t know there is a pathfinding behavior in the actions :sweat:)

now for the animation change : do you know how it’s working in these exemple please ?GDevelop 5
it’s exactly what i’m looking for but i can’t figure out how it’s done in the exemple.i didn’t see any events who change the tank’s animation…

It doesn’t look like there’s any events for the animation.

If you look at the tank object, somehow it has multiple sprites per direction as part of the SAME animation…I’ve never seen this done before and I can’t seem to figure out how to add that myself.

Someone else would have to chime in if anyone’s seen this before.

It’s because this animation has been done on GD4, and GD4 have an subtilite on directionnal animation.

You can’t add sprite animation for a specified direction in GD5. This has been never rewrite for the newIDE.

But you can do same without, take a look on Minda and the event for the animation, in the example Isometric game.

1 Like

What a pity
I already looked at minda but it’s top down movement. My game is a RTS so there are multiple objects to move at different direction so i don’t think it can work. I use pathfinding

Minda have a 8 direction with animation, like tank.
It’s just drive by event, not by the editor like tank in GD4.

Back again with no progress at all.
I tried hard with events like minda but as i only click ONCE to store pathfinding XY coordinates in my objects variables, 8 directions behavior seems useless… Any other idea to change animation of a pathfinding object acoording his direction?

Hi. Have you found a solution for your case?