Hi guys
Im pretty new to unity and am having a bit of trouble with activating a script on my prefabs. I have an enemy prefab, the enemy’s control script is activated when the player collides with a trigger around the enemy. This is working fin, I enter the trigger and the enemy will chase me. The problem I’m having is with using multiple enemies, when the player enters 1 of the triggers to activate an enemy every enemy in the level activates as well.
What I’m looking for is a way to change the activate variable in the instance of the prefab that the trigger belongs without effecting any other instances of the same prefab.
Any help you can offer would be greatly appreciated