Problem when I spawn several AIs of the same type

Hello, I have this problem with my AI, when spawning only one everything works correctly, the AI hears sounds and can see you, but when spawning more than one the problems start, the AIs get confused, one chases me and when another sees me they all stop chases me, it’s like everyone will use the same database

I’ve seen several posts with the same problem, they all said that I have to disable the “instance synced” option in the blackboard, all my variables are unchecked but it still doesn’t work
I would appreciate if you could help me

Here I pass the links to the project files and some example videos

https://drive.google.com/file/d/1zv5uwy42WS6QhGM6wa7CHJScbC8_E720/view?usp=drivesdk

1 Like

It seems to be working ok. The bugs have a small field of view so it’s hard to get in their peripheral vision. You can aim at each bug an press ’ to debug the specific bugs ai (see their perception, actions etc).

Works ok here, just have to get the character inside their vision cone. They register the player as the enemy and follow then try to attack.

2 Likes

I don’t know, the problem starts when you add more than one
If one is chases you and suddenly the other sees you, it is like the variables of both will be updated at the same time and they break
Could it be some hardware limitation? I don’t think so, I would appreciate it if you tried it again

1 Like

Added Ai icons to show state of each bug with visible enemy and current action.

2 Likes

Thank you very much! It will help me to investigate a little more what is the problem
I don’t know if you could see that there is indeed a problem
For anyone watching, if you can also test the last uploaded file to see if you see any problems or something wrong

it would help me a lot

1 Like

I also added the alertness flag set to true when the bug hears a sound. Thought it was more logical.

1 Like

I finally solved it, apparently the bugs also detect other bugs and when they saw that they did not have the “enemy” tag they executed “the follow the trail” branch

so I put a tag on the bug: “bug friend”, now if the actor that detects has that tag it does nothing and continues with the task it was doing

There are options to choose that only detect enemies, but you need a previous configuration to indicate who are enemies and who are friends, but from what I saw it is not possible with blueprints

2 Likes

@Hector-c5 Congratulations on finding the solution :slight_smile:

3 Likes