Good work.
Thank you.
Take it without if:
Code:

string level_str = <level1.WMB>;
string level_str2 = <level2.WMB>; //..etc etc
string level_next;
string temp_num;
var levell=1;

function nextlevel{
while(vec_dist(my.x,player.x)>10){wait(1);}
my.passable=on; remove(my); levell+=1;
str_cpy(level_next,"level");
str_for_num(temp_num,int(levell));
str_cat(level_next,temp_num);
str_cat(level_next,".wmb");
level_load(level_next);
wait(2);
}

action level_exit{
my.passable=on;nextlevel();
}


You don't need expand if branches now, when new levels added

Last edited by Lion_Ts; 09/24/05 22:21.