How to make an AI actor follow multiple copies of an actor class

Hey @Napoleontas1769!

The problem here is you’re querying the environment for only one of these objects.
What you need to look for is “Get All Actors of Class” and save that as a variable. Don’t do this every time you want to seek, as it’s very resource-heavy, so saving the array will work.

Something like this would work better.

This gathers all actors of that class, and then sets the first one in the list as the closest. Then, it cycles through all of them, and compares them to the current “Known Closest” in the array. Once they’ve all been run through and the final closest object is determined, it will set that as the object on your blackboard.

Let us know if there’s anything I can clarify further!

1 Like