• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

some help right here

N

nessabby1

Guest
score works fine by the object's steps. it adds up by 1 within 0 to 15 steps of the alarm[0] that is in the player object. however the when i want to pause, the score continues to add. how do i set it so that it pauses and resumes
in player object Create Event: i have the drag feature set alarm 0 to 15 steps
then in the Alarm0 Event: i have set alarm 0 to 15 steps again and then Set score to relative 1
and for its Draw Event:
{
draw_self()
draw_set_font(font0);
draw_set_color(c_white);
draw_text(512,64,score);
draw_text_colour(512, 64, string(score), c_lime, c_lime, c_green, c_green, 1);
}

i tried to add
if (globa.pause) {
keepIncreasingScore = false { alarm[0]++; Score ++; }
}else{
keepIncreasingScore = true { alarm[0] = 15; Score += 1; }
}
but obv that didnt do anything
 
J

Jaqueta

Guest
You have 2 options, 1, set the alarm to -1 in order to stop it when pausing. (This is not recommended, because you'll have to reset the alarm when resuming the game)
Option 2, create your own "Alarm", by using a variable.
Code:
if timer<=0
{
timer=15
//Do timer action here
}
if global.pause=false then timer-=1 //With this, the alarm will only count down if the game is not paused.
 
N

nessabby1

Guest
You have 2 options, 1, set the alarm to -1 in order to stop it when pausing. (This is not recommended, because you'll have to reset the alarm when resuming the game)
Option 2, create your own "Alarm", by using a variable.
Code:
if timer<=0
{
timer=15
//Do timer action here
}
if global.pause=false then timer-=1 //With this, the alarm will only count down if the game is not paused.
i added the code and it set timer not set of reading
 
N

nessabby1

Guest
You have 2 options, 1, set the alarm to -1 in order to stop it when pausing. (This is not recommended, because you'll have to reset the alarm when resuming the game)
Option 2, create your own "Alarm", by using a variable.
Code:
if timer<=0
{
timer=15
//Do timer action here
}
if global.pause=false then timer-=1 //With this, the alarm will only count down if the game is not paused.
can you please explain i am not understanding.
 
J

Jaqueta

Guest
The reason of why it's not working, it's because you didn't read the code and just throw it at your game, you see the "//Do timer action here", well, that's where you put YOUR code, the actions you want to perform when the timer reachs zero.
 
N

nessabby1

Guest
You have 2 options, 1, set the alarm to -1 in order to stop it when pausing. (This is not recommended, because you'll have to reset the alarm when resuming the game)
Option 2, create your own "Alarm", by using a variable.
Code:
if timer<=0
{
timer=15
//Do timer action here
}
if global.pause=false then timer-=1 //With this, the alarm will only count down if the game is not paused.

i figured out how to do it, i just added
if (global.pause) {
score-=1
}

Thanks
 
Top