Ok, that totally worked. Except I was hoping that each time the enter button is hit, the switch would move to the opposite direction (on or off). I've added another if statement and included and else one too but the switch only moves to the "on" position and that's the end of it.
Code:
action trigger_switch()
{
	t_trigger = me; //this is a pointer defining the entity listed at the top

	while(1)
	{
		if (key_enter)
		{

			if(trig_percentage = 1)
			{
				trig_percentage %= 100;
				trig_percentage += 2*time_step;
				ent_animate(t_trigger, "on", trig_percentage, ANM_SKIP);
				trig_percentage = 0;
			}
			if(trig_percentage = 0)
			{
				trig_percentage %= 100;
				trig_percentage += 2*time_step;
				ent_animate(t_trigger, "off", trig_percentage, ANM_SKIP);
				trig_percentage = 1;
			}
			else
			{
				trig_percentage %= 100;
				trig_percentage += 2*time_step;
				ent_animate(t_trigger, "on", trig_percentage, ANM_SKIP);
				trig_percentage = 0;
			}
		}
		wait(1);
	}

}