Hi, I'm currently making a top down shooter game, and I have a basic AI already. I have an invisible object that is used as the enemy's sight, and if it hit's the player then it will make the enemy fire. This works fine, however, when one enemy sights the player, they all instantly know of his location. Is there any ways to get round this so that only the one that spotted him knows?
Fusion has something called object scope that determines which object or group of objects an action applies to.
By default all instances of all objects are in the scope, so you need to narrow it down using conditions. The easiest is the alterable variable check. You can assign an ID to all enemies and then have the line of sight object share the same ID. When the line of sight overlaps the player narrow down the selected enemy by checking for the ID to match that of the enemy.