I have the enemies in my top down shooter shoot out an invisible object, if the object hits the player and not a wall, the enemy shoots. The problem however is that if one enemy hits you with the invisible object it acts as if they can all see you and they attempt to shoot you through walls. I would like for someone to explain how to make it so when 1 enemy sees you he shoots at you and no one else does.
You don't have to use a random ID. Using spread value simply assigns values to all instances of an object from whatever number you gave it + the number of instances.