Hi all,
after creating my previous quite basic text101 ‘game’, I decided to try and expand my code and make things a bit more complicated.
I’m now up to 30 different states before you even complete the puzzle to get out of the first cell and I can’t wait to share this attempt!
The next part of my puzzle requires a 20 second countdown timer.
Here is my code
What should be happening is that the when we get to screen2, bedtime is then set to 20 and the countdown starts.
What actually happens, is that it doesn’t count down, it stays on 20.
If, when I declare the float and set it’s value at that point, then the countdown DOES work.
I tried to move line 21 ( if (bedtime > 0) {bedtimer ();} ) to the line underneath where I give bedtime the value, but this doesn’t work either.
I just can’t get my head around why this doesn’t work. I’m sure it’s something simple but the logic escapes me.
Can anyone explain why this doesn’t work and help me find a solution?
Thanks
