[AI] How can i make only certain enemies detect player?

Okay so i have an enemy whitch will be placed in groups and i want that once one of the group detects you all other enemies detect you.

To do that i have a public Enemy character array in the Enemy Character where i set from the editors the enemies i want it to alert. Then the AI Controller gets that information and if it sees you and if it hasn’t detected you it does a for each loop of the enemies to alert array and sets their Blackboard key bool “PlayerDetected” to true.

The problem is that it sets the “PlayerDetected” of every enemy in the level to true.

Use interface to track your enemies (There is node called GetAllActorsWithInterface in BP, so all you need to do is add interface function to your EnemyActor and group them using some custom variable ) or you can try to use Gameplay tags.

Another way to do this is spawning sphere or some other collision shape and call DetectedEvent on BeginOverlap event in every enemy.

Thanks a lot, the problem was that the blackboard key had instance synced to true but your method is also really good.