I have been doing the FPS tutorial (I have A6 comm) and I can't get the level_change function to work. Everything up to this point works. I have the action and function set up but when I run my player into the map entity it doesn't load the new level. Here is my code.
function level_change()
{
wait(1);
if (EVENT_TYPE == event_impact)
{
my = NULL;
freeze_mode = 1;
level_load("LEVEL2.wmb");
wait(2);
freeze_mode = 0;
}
}
ACTION leave_block
{
my.enable_impact = on;
my.event = level_change;
}
Am I doing something wrong?