Really Stuck with AI issue.

Hey guys,

I’m completely stuck, I’ve managed to figure out a lot of it, but there has to be some point I’m missing.

I’m trying to make spawned ai in a bounding box, move from point A to point B as they spawn and repeat.

Now, I have the spawning done fine.
I have the movement done SORT OF… they move, but only if the BP is in the level blueprint.
Ai controller BP doesnt create the desired effect or move them at all sadly.

The problem I have encountered is, after they spawn, they will move to one of the points which is good. however, after they move to that point,
most stop moving and only one is left going back and forth, and i know the nodes are firing due to print string, but its only going to the last created actor.

ideas? I need all the spawned ai to constantly move - space invaders style.

thanks in advance guys.

Need Input. Input. Input Stephanie! Seriously, more info on the problem. BP Pictures, set up, and more.

As previously said, you havn’t provided enough information. Behavior Tree is probably the most reliable way to do it, especially if you are going to incrementally add more behaviors. For that use the Spawn AI node after you’ve made the BehaviorTree and you’ll need a BlackBoard with a vector for your goal. Make a service that sets the goal location, then just a moveto task.

Apologies for not adding pics, it was very late and had been staring at blueprints all day.

Anyways, here are the 2 screenies of my BP first is spawning which works fine. for spawning them.
second is the movement part which half works, im almost certain it works, but then only applies to the final spawned one.

I don’t know anythin about Behaviour Trees so didnt do it in that.
The AI is only going to patrol point A and point B.


If you look at the Spawn Ai from class node you will see that there is a selector for a behavior tree.

If you create a Behavior Tree and select it there, it will run after the class is spawned.

You could try setting a much larger acceptance radius. Again, I don’t think this is a god way to do it though.

alrighty ill look into learning behaviour trees, thanks :slight_smile: i was hoping there was another way around it but yeah :slight_smile:

ok i followed the setup for the behavior tree in UE documentation. which didnt work so well… i even fixed it by ticking the BT task option in project settings. anyone who knows BT a bit better help me out? i can’t seem to figure it out. i just need a patrol mechanic. point a to point b, and repeat. i know the BT is firing in simulation, just no idea why its not working properly.


You can try to watch this tutorial series and possibly adapt it to your needs.