[Solved] How Do I stop this from resetting the timer before it's done

How do I…

I have a button that is a fill bar and once its clicked it starts a timer and the bar shows progress. If the player clicks it again before it done it resets.
I need to stop that from working until the timer is up. Ive tried more than a few different changes and options and I break the fill bar filling or the timer from finishing.

Related screenshots of code

Try moving The timer energy of energy is not pause up to the first condition block shown, and put it to the timer of energy IS paused. In the actions of that block under start/reset timer add unpause timer. In the bottom block of events where you have delete timer, try putting pause timer instead.

I must be doing something wrong I tried a few different orders as well and still not working for me … hmmm

Then just use a boolean variable or something. You just need a way to tell GDevelop that if the player clicks energy and it’s not already running a timer, then run the timer. So maybe do cursor on energy, mouse released, bool TimerRunning of object energy false, start timer, set bool to true. Then on the other one do Delete timer from memory, set bool to false.

1 Like

Ill try that tonight
Thanks for all the help

1 Like

Don’t thank me yet, let’s make sure it works first lol.

1 Like

Finally got it to work! Thanks for the help. I added the start of scene pause changed pause and unpause and go tit to work

1 Like