AI follow another AI (automatic)

Hello guys,

i have one question…

Can anyone help me how can i do: 1 AI(minion) will follow second AI(boss)? I am not that good in UE4 then if anyone can give me pictures it will be cool… I need class/controller because minions(50x Entities must follow boss) and 1 Boss. I dont understand how can i make controller of the boss in controller of minions(i mean how can i make a goal like “Boss” for minions)

If anyone can help me it will be rly cool, thank u for time.

You should look into “behavior trees”. There you can just make a task that says go to location X. And then update location X with the bosses location. https://docs.unrealengine.com/latest/INT/Engine/AI/BehaviorTrees/QuickStart/

You dont understand my question… I know i must use “behavior trees”, but i ask about this: "And then update location X with the bosses location. " how can i get his location in AI(minions) controller. This is my question. :slight_smile:

As explained in the documentation that I linked regarding the Behavior trees, you need to use a blackboard asset that holds a variable “X” and then you refer to that var in the “move to” task. The value can be set from anywhere as shown in the 3rd screenshot.

I dont know but i cant let it work… I try 6 variants and experiments but nothing… Can u please tell me what i did wrong?

Try giving your AI a Character Movement component. That should make it work with the pre made “Move To” Task. And make sure you have a Nav Mesh volume in your level. Hit P so make it visible. Then, ground should be covered by a green surface. Thats all I can see so far. The rest looks like is should work.

Either I had set.

Nobody know? :o

or simple blueprint action (for me its easier to make it this way), if you have a minion (hope they are all the same ) go into his bp and use simple move to actor… as actor you have to reference to your boss …i would do it this way:

in your minion bp you define the boss ,which u want to follow and then tick it with a delay and a simple move to the defined boss. make sure u set the navmesh right (Press P , green ground is legit.) and you have the right ai settings in default.

a more tricky thing , if you have the same “minibosses” in a map u could assign bossID’s , just make sure u make this integer open to everyone (Eye icon beside the variable ) so you can assign it right in the editor.

Thank u so much!!! :slight_smile: And can i get his pawn or i cant? Because i wanna use AI move to, to detect when he get the location if u understand me.

if you want to use that, u have 3 pins u could link

  • pawn
  • destination
  • target actor

you may write this note in the minion bp , so pawn is a reference to self

and the targeted actor is the defined boss

or do i missunderstand that? do you want the minions all time follow , first follow when the boss reached a new location?