SCRATCH GOLD II
SCRATCH GOLD I
2 of 3

3.03 Add a timer

Create a countdown timer on the Stage with the help of a new variable called time. The timer should begin at 30 seconds and count down to 0 seconds.

Stage sprite

Create a broadcast that sends the message ‘end’. A broadcast is like an announcement over a loudspeaker: it can be heard by all of your sprites. Add the broadcast block to the end of the timer code so that the code will send an ‘end’ message when the time has counted down to 0.

Stage sprite

Select your character sprite and add some code so that the sprite stops the other scripts when it receives the end message.

Giga sprite

Test your game again. It should continue to ask questions until the timer has counted down to 0.

×
×

Cart