Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » countdown timer on ask and wait
- bcphysics
-
3 posts
countdown timer on ask and wait
Hello,
My son and I are designing a math game. We are trying to implement a timer, so when a question comes up the person has a set time to answer. I can't figure out an elegent way to pull this off. We have a timer that counts down to zero, and can do different things once the timer hits zero. However, nothing happens until the ask question is answered. This is the “wait” part of the ask and wait. I believe there could be a way to stop all, but I'm looking for other ideas on how to get the wait to terminate once the timer reaches 0.
Here is an example project: http://scratch.mit.edu/projects/26704820/
thanks
Doug
My son and I are designing a math game. We are trying to implement a timer, so when a question comes up the person has a set time to answer. I can't figure out an elegent way to pull this off. We have a timer that counts down to zero, and can do different things once the timer hits zero. However, nothing happens until the ask question is answered. This is the “wait” part of the ask and wait. I believe there could be a way to stop all, but I'm looking for other ideas on how to get the wait to terminate once the timer reaches 0.
Here is an example project: http://scratch.mit.edu/projects/26704820/
thanks
Doug
Last edited by bcphysics (Sept. 14, 2014 07:17:09)
- drmcw
-
1000+ posts
countdown timer on ask and wait
The ask block can only be stopped by the user. The only programmatic way to end an ask box is the stop all which defeats the point here. Either just wait for the user to enter something and tell them they were out of time or don't use the ask box, write your own version e.g http://scratch.mit.edu/projects/19204741/
Last edited by drmcw (Sept. 14, 2014 07:51:10)
- epicsandwich123
-
100+ posts
countdown timer on ask and wait
hi, i can't garuntee this will work but someone posted it on my discussion
It will be very useful to have a block like this Perhaps I could have your advice on that?
It will be very useful to have a block like this Perhaps I could have your advice on that?
- stickfire-helper
-
24 posts
countdown timer on ask and wait
You could try having only two scripts in the sprite which asks the question:
- drmcw
-
1000+ posts
countdown timer on ask and wait
will not stop an ask block only stop all will. I'm afraid both solutions won't solve the problem as mentioned before.
- bcphysics
-
3 posts
countdown timer on ask and wait
Thanks.
How did you get the list “answered?” into the set block for variables/lists? I only see how I can use the set block with existing variables.
cheers
How did you get the list “answered?” into the set block for variables/lists? I only see how I can use the set block with existing variables.
cheers
Last edited by bcphysics (Sept. 21, 2014 03:12:36)
- bcphysics
-
3 posts
countdown timer on ask and wait
And where did the block with “answered? = 1 >> then” come from?
thanks
thanks
- TheCoolGuy555
-
2 posts
countdown timer on ask and wait
Well, I think this will work.
, Or maybe not.
Then this is the timer. Make it change by -1 overtime after a second. Then, also set it back the 5 seconds…
One example:
…and continue taking away seconds.


Then this is the timer. Make it change by -1 overtime after a second. Then, also set it back the 5 seconds…
One example:
…and continue taking away seconds.
- ScratchModelMaker
-
100+ posts
countdown timer on ask and wait
Here ya go, I reviewed your project and saw the problem,
Broadcast Changetimer:
Check if timer is over 5 already,
Broadcast Changetimer:
Check if timer is over 5 already,
- Discussion Forums
- » Help with Scripts
-
» countdown timer on ask and wait