C
Chtichoko
Guest
Hey there,
I created a basic clock who is persistent from my 1st level to my last one.
I have a menu transition leading to next level from one to two then from 2 to 3...
I want that my clock is getting paused while i m in transition screen cause for now, the clock still continuing...
I can t find anything about this feature and i m pretty new on GM2.
To understand, Here s what i made with an object named clock and where s i m lost...
I want that my clock getting PAUSED when my player leave level 1 to transition menu then UNPAUSED when starting level 2.
create event :
image_speed = 0;
alarm[0] = 60;
clockactived = 1;
seconds= 00;
minutes =00;
STEP :
if clockactived = 1{
secondes +=1/60
minutes =0
if(seconds >= 60)
{
seconds = 0
minutes++
}
}
else if
clockactived =0
{ frame -= vitTemps }
Alarm :
alarm[0] = 60;
Draw GUI :
case rm_level1:
draw_text(110, 450,string (minuts)+"min. "+string(secondes)+"sec.")
case rm_level2:
draw_text(110, 450,string (minuts)+"min. "+string(secondes)+"sec.")
i think that STEP event doesnt have all needed to get the pause system.
i already tried something about putting "clockactived =0" when i player finished level 1 then putting back clockactived to 1 when starting level 2 but not working.
If you can help, you re welcome
Thank you,
I created a basic clock who is persistent from my 1st level to my last one.
I have a menu transition leading to next level from one to two then from 2 to 3...
I want that my clock is getting paused while i m in transition screen cause for now, the clock still continuing...
I can t find anything about this feature and i m pretty new on GM2.
To understand, Here s what i made with an object named clock and where s i m lost...
I want that my clock getting PAUSED when my player leave level 1 to transition menu then UNPAUSED when starting level 2.
create event :
image_speed = 0;
alarm[0] = 60;
clockactived = 1;
seconds= 00;
minutes =00;
STEP :
if clockactived = 1{
secondes +=1/60
minutes =0
if(seconds >= 60)
{
seconds = 0
minutes++
}
}
else if
clockactived =0
{ frame -= vitTemps }
Alarm :
alarm[0] = 60;
Draw GUI :
case rm_level1:
draw_text(110, 450,string (minuts)+"min. "+string(secondes)+"sec.")
case rm_level2:
draw_text(110, 450,string (minuts)+"min. "+string(secondes)+"sec.")
i think that STEP event doesnt have all needed to get the pause system.
i already tried something about putting "clockactived =0" when i player finished level 1 then putting back clockactived to 1 when starting level 2 but not working.
If you can help, you re welcome
Thank you,