• 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!

I need help please

LamaMate

Member
Hi, i am making a tycoon game right now. But something is not working. I am trying right now to make an autoclicker. But somthing is not working wioth the alarm. if i set it to one, it works, but if i set it to 2, it doesnt work anymore, here the code :

the step event from my click object:
if(global.auto_clicker_mode == true)
{
alarm[0] = 1;
}

the alarm 0 event fron my click object:
global.coin_score = global.coin_score + 1;

the create event from the autoclicker:
//auto clicker mode
global.auto_clicker_mode = false;
upgrade_price = 1;

the touch event from the autoclicker:
if (global.coin_score > upgrade_price)
{
instance_destroy();
global.coin_score = global.coin_score - upgrade_price;
global.auto_clicker_mode = true;
}




it would be nice if u can help me guys
 

TsukaYuriko

☄️
Forum Staff
Moderator
If you set it to 1, it gets set to 1. The next step, it counts down to 0. Its event fires. It gets set to 1 again.
If you set it to 2, it gets set to 2. The next step, it counts down to 1. It gets set to 2. It counts down to 1. It gets set to 2. It counts down to 1. It gets set to 2. Down to 1. Back to 2. Down to 1. Back to 2. 1. 2. 1. 2. 1. 2. 1. 2... :)
 

Rexzqy

Member
Can you please include how you solved your issue so this thread may help others in the future?
I am guessing he/she did sth like if alarm[x] = -1 then set alarm to y but probably yall know and just want him/her to gain a good habit
 
Top