How to queue AIController's move to location

Hi,
Both Move to location and the simple version of it return instantly and therefore I am not really sure how I could queue several move to location commands. What I am trying to do in general is have the RTS style shift queuing of units. I am almost done with all basic RTS features but this one got me confused. Not sure where to start.

Thanks.

Do you want to move to a position and instantly move to the next position in queue?
Can’t you add the location to an array and as long as the array isnt empty, you go to the next index.
If you reach a position, you delete if from the array.
Is that helping you?

that was my plan as well, but how would it know if it has finished moving to the last location?

Since you are using the AIController, i guess you also use a Behavior Tree.
You can do this with the “MoveTo” Node.and a decerator on top of it to chose the next waypoint.

If you don’t understand this, i would recommend to watch a tutorial on Behavior trees. It’s a bit too much to explain here.

Hey, i haven’t heard from you a while. Is everything working?

I have reworked my controller and included the Behaviour tree in it. Queuing does seem to work but now I can’t cancel the Move To command until it has finished moving to the end. But I guess it’s a different question, I should have marked this one as answered.

Your AiController can call a function named “Stop Movement” or something like that. I’m not at my pc atm but that should work for stopping.