Forum Discussion
sabrmanz
4 years agoCommunity Member
Javascript Countdown Timer
Hello heroes!
I'm trying to create a Javascript countdown timer that starts at 02:30:00 and when the remaining time is over, the course is complete.
However, i'm facing this problem: everytime t...
MathNotermans-9
4 years agoCommunity Member
Testing your Story... the variable 'count_start' needs to be set to 'false' when the timer is running. This is not happening now. So if you do that...it keeps counting nicely whenever you change tabs. But it is not fixed completely with this. Do add a console.log("totalTime: "+totalTime+" | count_start: "+player.GetVar("count_start"));
in your Javascript when the countdown is over. Then you will notice that however the count keeps counting down nicely...the variable 'count_start' gets reset to 'True' whenever a new questions starts. So this we need to fix still.