There are (of course) multiple ways to do this, for example these two:
void level_Change()
{
if(you == player) my.skill10 = 0;
}
action touch_Entity()
{
my.event = level_Change;
my.emask |= ENABLE_PUSH;
my.group = 2;
my.skill10 = 1;
while(my.skill10) wait(1);
level_load(my.string1);
}
Here you can enter the name of the next level in the entity's first string field in WED.
Other approach:
TEXT* txt_level_names =
{
string("shooter.wmb","outdoor.wmb");
}
void level_Change()
{
if(you == player) my.skill10 = 0;
}
//skill1: level_id 0
action touch_Entity()
{
my.event = level_Change;
my.emask |= ENABLE_PUSH;
my.group = 2;
my.skill10 = 1;
while(my.skill10) wait(1);
level_load((txt_level_names.pstring)[my.skill1]);
}
Here you can use a text object as an easy way to realize a string array, then write your level names into the string parameter and then use the first entity skill as an index to load the appropriate level.