I have researched how to add an countdown to my whack-a-mole game. I found a video, but there the countdown had an extra button to start it. But I want it that when the game opens, the countdown directly starts. Can someone help me?
PJ
This is my programming for the countdown⬇️
1in screen .initialized, set countdown.enable to true.
2 remove the counrdown = true block
3. add else block, set countdown.enabled to false.
I think the "if countdown = true" is the thing that is messing up your program
So should I change ,true, to ,false, ?
I tried it but it still doesn't works.
Does someone have any other ideas?
In the Video it was with an button, so if you click the button the timer starts.
I just Ignored the button, maybe that is the problem...
Here is the programming from the original Video⬇️
Hi,The game Looks great am not sure how to fix it.
The blocks in the video specifically have a "initialize global start to false" which is set to true when the user clicks the button, however you do not have any variable that is set to false, so you should add one
Hi, We are all at the same school and signed up with our school email addresses while at school. I am "Josefine"'s teacher, actually! She took the initiative to join and post the question in the forum herself so I joined to support her. I am not sure who the other account is but we have about 60 kids working on programming at the moment so it is possible another student has also signed up.
Thanks for clearing this up, sorry for my mistake.
Can you post a link to the original video?
It might need correction.
You are using only 1 global variable countdown, the original uses 2 variables start and timer
Remove the countdown = true part from the if statement
Also you are using a clock, which has been renamed to Countdown, so you got confused
Set that clock to enabled = true in the designer to start it immediately
If you got that, then add 3, see again
Taifun
Thank you, I'm going to try that.
This is all that is needed to start a timer (countdown) when opening the app: