in my main script i want to place a script that changes the level when the main character collides into a certain block (like running into a time portal) i know it is a template i downloaded,but here is the code i want to add:
//This is a product of Joey Bee Productions. Please include in credits.
bmap loading_lv = <blank.bmp>; //Loading screen
panel loadingscreen {
bmap = loading_lv; //loading screen name
flags = refresh,d3d;
}
function load_level()
{
loadingscreen.pos_x = (screen_size.x - bmap_width(loading_lv))/2; //centers loading screen
loadingscreen.pos_y = (screen_size.y - bmap_height(loading_lv))/2;
loadingscreen.visible = on; //displays loading screen
wait(3);
wait(-2);
loadingscreen.visible = off; //clears screen
bmap_purge(loading_lv);
LOAD_LEVEL <-->levelname<-->; //level name
}}
ACTION levelchange //*assign this to a map entity blocking the way out of the level*/!!!!
{
MY.INVISIBLE = ON; //makes entitie invisible
MY.ENABLE_IMPACT = ON; //enables player impact
MY.EVENT = load_level; //function name
}
if you could tell me how to include this into my main script i would be thankful.
regards,
michael