level changing problems

Posted By: aslan123

level changing problems - 04/30/07 17:34

hi
I want to be able to change levels which I know how to do but when the next level loads the health, lives and others are restored to the values that are loaded in the first level. say i gain an extra life in level 1 and my health drops from 100 to 80, i want those values to be displayed in level 2

does anyone know how to do this

here is my current level changing code

*************************************************************************
bmap loading_lv = <newlevelload.bmp>; //Loading screen
panel loadingscreen
{
bmap = loading_lv; //loading screen name
flags = refresh,d3d;
}

function load_new_level()
{
/*wait(1);
if (EVENT_TYPE == event_impact)
{
*/
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(10);
my = null;
freeze_mode = 1;
loadingscreen.visible = off; //clears screen
bmap_purge(loading_lv);
load_level ("testlevel2.wmb"); //level name
wait(2);
freeze_mode = 0;
//}
}


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_new_level; //function name

********************************************************************
Posted By: Xarthor

Re: level changing problems - 04/30/07 17:46

Are thoses values skills or vars?
Posted By: aslan123

Re: level changing problems - 04/30/07 17:49

value skills

here are the ones i want to carry forward

DEFINE HEALTH,skill1; //current HEALTH units
DEFINE ACORNS,skill2; //current ACORNS units
DEFINE LIVES,skill3; //current LIVES units
© 2024 lite-C Forums