How to make multiple copies of an enemy with same bluprint?

Hello, everyone.
.
How can I make multiple copies of the same enemy AI in UE4, without them all acting as one?
I have a simple generic enemy that is not unique, and will be placed in multiple places of the same scene. I drag-dropped multiple copies of it in the scene, so when I enter the trigger that is supposed to activate the AI only one of them activates, and if I attack any random copy until its health reaches 0, the one that is active dies…
So, long story short; how can I let them act independently in health, AI, etc… while still using the same actor blueprint?
.
In the image: BP_Lady is the name of the enemy blueprint, “SeekHana” and “Attack” are custom events inside BP_Lady.

Please read the post and have a look at the video.

https://forums.unrealengine.com/showthread.php?95172-Multiple-AI-using-Behavior-Tree

Thank you for the answer :slight_smile:
I checked the link out, actually i’m not using Blackboards and Behaviour Trees since i haven’t learned how to work with them yet.
I’m using simple AI Move To, and a simple attack function that plays the animations when at a certain distance, and subtracts from player’s health.
Is it not possible to make them work independently if there’s no Behaviour Tree and Blackboard?

you get all actor of class is an array but activate only the ai with index 0.
you need to do a ForEachLoop [][1]

[1]:

I’ve tried it and all the instances of the enemy (Lady) activated at the same time… I want every instance to activate only when i enter its trigger. Not to activate ALL instances when i enter ANY trigger.
.
Also when i enter one of the triggers and all the instances get activated, the same one dies everytime no matter which instance i attack, and the others can’t be killed anymore.
.
For example: I’ve got 1, 2, and 3 which are all copies of the same BP. i attack 1 and it dies. i attack 2 or even 3, 1 dies everytime, and then 2 and 3 become basically invincible, since the Health variable is already 0…

send graph images of all you explained.

we will get it worked as you want :))

and some questions:

do AIs have a collision box/sphere around them ?

what is that new bound trigger?

ok. wait a few minutes.

I am back with the answer and I hope it helps you.

we have a player that if sees a lady, he kisses her or he attacks her . he is crazy.

and we have some crazy ladies too.

in our lady class we have added a box collision around her: so she can overlap with all actors in the world.

now we want to tell to lady what to do if that actor that she overlapped with is our player.

this is our lady class

you do not need to get player and check if other actor is that you need to only cast.

this is our player class.

you do not need to get all ladies you must only check if other actor is a lady so you will only kiss/attack that lady you overlapped with and you will have no effect on other ladies.

Ok… On the way :slight_smile:

I don’t know what else you need… Just tell me and i’ll provide them right away.

No, there’s no collision box. I’m using the capsule component’s collision.
New bound trigger is just a normal sphere trigger around the actor.

I’m thinking that maybe i can use Find before Get; but i don’t know what to attach to it… How do i get the integer that represents that certain instance of Lady BP that the sword is overlapping with!
.

First of all, thank you for this post, you really made my day, i literally LOL’d.
Second… i did just as you suggested, still the problem is that only index number 0 is dying everytime. I think it’s because of this:

and the others are basically becoming immortal since the health becomes 0 anyways…

Yeah i did this and everything works correctly now, and i can kill every lady alone :slight_smile:
Thank you for ur time my friend… Thank you so much!

yes you can use the capsule component instead of that box i added to lady

what is the need to get all ladies?

you want to just trigger some event on a specific lady which you overlap with.

yes index 0 will die because you get only 0 on each overlap.

you need to get only the lady you overlapped with not all them.

Ok… One noob question though, how do i mark it as solved? :stuck_out_tongue: