I have a code that is supposed to change the level to when I touch an entity. But when I go to touch the model I assigned the action to, nothing happens and it is as if the model is solid. Here is the code I am using. It is from the FPS tutorial by Grimber.

function level_change()
{
wait(1);
if (EVENT_TYPE == event_impact)
{
changeto_level = my.skill1;
my = NULL;
vec_set(temp_loc,player.x);
vec_set(temp_ang,player.pan);
camera.visible = off;
freeze_mode = 1;
if (changeto_level == 1)
{
changeto_level = 0;
level_load("Out.wmb");
}
if (changeto_level == 2)
{
changeto_level = 0;
level_load("B.wmb");
}
freeze_mode = 0;
wait(2);
vec_set(player.x,temp_loc);
vec_set(player.pan,temp_ang);
camera.visible = on;
}
}

ACTION levelchange //*assign this to a map entity blocking the way out of the level*/!!!!
{

MY.INVISIBLE = ON; //makes entitie invisible
MY.ENABLE_IMPACT = ON; //enables player impact
MY.EVENT = level_change; //function name

}


If death is only the beginning, then life must be the end... -me