Is there a way to enable the Npc script only when the player enter in a trigger? And disable when he exit?
I know how to set up a trigger but I don't know what action can do this... like an Object, Npc, Send message, Turn off and Turn on...
I have 5 npc and when they are all activated, in the profiler the voice "NPC.FixedUpdate" is at 86% and all slow down... when I uncheck the Npc script, all is working clear and smooth and become 0,1%!
I also tryied to remove the capsule collider but become 75%...
Tx
Comments
Either way, you're nearly there!
GameObject.Find ("NPCMacho").GetComponent ().enabled = false;