Making a path for AI to walk along that can be customised based on each actor using AI controller

Hello! Just to specific this further, I know how to make a path in the AI itself. However, what I’m working on requires an AI controller. Since I’m already using it to maintain the FSM states used to control the AI, I would like to know if it’s possible to make a customisable array of locations for the AI to move along.

I know how to get the actual movement working, but what I’m stuck on is allowing it to be customised. So far I have an array of vectors with instance editable and show 3D widget enabled, and the AI controller in question is linked to two instances of a character object (if I’m being unclear, I have my controller, I have my blueprint for the AI, and I have multiple instances of the AI. I’m supposed to be doing it this way for the sake of an assessment).

When I go into the editor with the array in the instances themselves I can edit it in the level viewer, but when I put it in the controller I can’t. While I could give the controller one set path I’d rather make it so I can have them each follow their own path. Is there a way to do this?

If you need any further clarification please let me know.

I am not sure I understand you correctly…

The issue you have is that you don have multiple references of the AI controllers where you can edit the path for each entity right?

In this case it would be alright to save the different paths (list of points) in the pawns that the AI will control and either use them from the pawn or load them in the controller on posses.

Now if you don’t have the AI pawns already placed in your level at the start, you are left with two other options:

  • Place custom actors in the level that hold the paths and each time you spawn an AI take one of them. (This will help with editing too as you can place custom handles)
  • Place the paths (lists of points) in the game state and assign it to each AI actor you spawn.

Hope I understand you correctly and this is helpful. :slight_smile:

Cheers!

So what you’re saying is to place the path variables in the pawns and pull them into the AI controller when doing the movement command right?

I’ll give that a try if I have a chance before work today and let you know how it goes, otherwise it’ll have to be tomorrow.

Ran out of time yesterday but I can confirm today that worked thanks