Enemy Spawning Issue

The scenario:
So I have a considerable ammount of enemies populating the many rooms of my evil military complex. I came up with a way to prevent the enemies from moving around the facility as they look for the hero before they even see him. My method is that I created certain “way points” that act on a triggered event. So unless the hero enters this “way point”, the enemy wont show up.

My attempt:
I created a script that handles the triggered event and makes sure to disable the enemy meshes if the player hasnt gone past them.

Here is the code snippet:

public class EnemySpawnPoint : MonoBehaviour {

static bool[] hasPlayerEntered = new bool[4]; //array of booleans for each 
     // "waypoint"

public Transform player; //takes the player object
public Transform enemy; //enemy object

void OnTriggerEnter(Collider collision)
{
    //check if user already entered checkpoint
    switch (this.tag)//if player enters...
    {
        case "Spawn Point 1":
            hasPlayerEntered[0] = true;
            if (hasPlayerEntered[0])
            {
	    Debug.Log("Spawn Point Reached");
            }
            else
            {
                hasPlayerEntered[0] = false;
            }
            break;
                    default:
            Debug.LogError("Incorrect checkpoint tag");
            return;
    }
 }

}
The problem:
It doesnt go to the first case, it just jumps down to the default case and outputs the default log error. Can anyone hhelp me fix this?

You’re switching on this.tag, which will give you the tag of the GameObject this script is attached to. Perhaps that’s your player character?

If you intended to switch on the tag of the object that you just walked into, you might try collision.gameObject.tag.

Incidentally, naming your Collider parameter “collision” might cause some confusion, as there is also a Collision type. Not necessarily an issue, but something I thought I should point out.