Try this! I think events need actions not functions
ACTION level_change //i think this must be an action
{
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
{
MY.INVISIBLE = ON; //makes entitie invisible
MY.ENABLE_IMPACT = ON; //enables player impact
MY.EVENT = level_change; //action name
}
Also i would change
IF (EVENT_TYPE==EVENT_IMPACT) {
to
IF (EVENT_TYPE==EVENT_IMPACT)&&(YOU!=NULL)&&(YOU==PLAYER) {
I use YOU!=NULL to avoid empty MY errors...but u dont need to.
Checks if the player "impacted" with entity, not a monster
or something. If u dont use player_walk (templates), add this to ure player code:
entity* player;
ACTION Player_Walk { //or whatever
...
..
PLAYER = ME;
}
Tip: Use BEEP to check if events are called.