Yes, assign the action...the collision one, to a object you plan on being the trigger....
*it must not be passable.
*it only works if the object*(player) that impacts it is moving under the influence of c_move and is ALSO not passable.
in the script I posted earlier....
I did forget a terminator,statement end-er thing(semicolon)....";" after my var declaration.
The code works here....although I put it all inside the main function and ditched the external function.
Espér's method is much cleaner, witha small change.
function level_event(STRING* levelname)
{
str_cpy(levelname,my.string1);]//now you can set it in med
str_cat(levelname, ".wmb");
level_load(levelname);
wait(3);
str_cmp(levelname, "");
}
action colider()
{
my.emask |= ENABLE_IMPACT;
my.event = impact_event;
set(my,POLYGON);
}
function main()
{
...
level_event("Leveldatei"); // call level without "*.wmb" ending
...
}
I have not tested it. I thought my way to be more logical to a beginner standpoint...using simple if this then that or else do this.....syntax...it is long winded, but simple.