OnTriggerEnter Question

I am using the script below to create a trigger zone. I found it online. I have three triggers (cubes, trigger box checked, mesh removed) with this script attached. The scrips are altered to be unique. I designated the fpc to be the collider. The three zones work the first time through. If the user goes back, the triggers to not work. I commented out the part of the script that is supposed to make the trigger only work once. Either way, I get the same result. Each trigger works once. Any help would be appreciated.

var zone1 : Collider;
//private var triggered1 : boolean = false;

function OnTriggerEnter(collision : Collider) {

	if(collision !=zone1){
	return;
	}
	//triggered1 = true;
	print("1B works");
	}

It would be better to use tags or names to identify the triggers. If you name them “Trigger1”, “Trigger2” and “Trigger3”, for instance, you can use this code (player script):

var trig1 = false;
var trig2 = false;
var trig3 = false;

function OnTriggerEnter(other: Collider){

  switch (other.name){
    case "Trigger1": trig1 = true; break;
    case "Trigger2": trig2 = true; break;
    case "Trigger3": trig3 = true; break;
  }
}

function OnTriggerExit(other: Collider){

  switch (other.name){
    case "Trigger1": trig1 = false; break;
    case "Trigger2": trig2 = false; break;
    case "Trigger3": trig3 = false; break;
  }
}

The variables trigN will become true when the player enters the corresponding trigger, and reset to false when the player exits it.

EDITED: I noticed that your script is attached to each trigger, not to the player. In this case, your code could work fine if you added the OnTriggerExit event to reset the triggered variable (the player should be dragged to the zone1 variable of each one).

This script is so clean and simple. I put it in. It works for enter and exit for three different trigger zones, but it still won’t repeat. Any more suggestions? Thanks!