Page 45 - Ones and Zeros 4 (Student Book)
P. 45
Data and Variables
Lesson
Lesson
Fun Time!
Adding sounds.
To make the game more interesting, you can
add a sound every time someone answers
a question correctly.
1 Go to the ‘Sound’ menu and find the
block labelled ‘play sound until done’.
2 Drag this block under the ‘say ‘Correct’
for 2 seconds’ block. Do this for every
correct answer.
Adding a finish to the game.
When your questions are over, you can add a
simple ‘say’ block, thanking the person who
played the game. Add this block to the end of
the script.
Challenge Yourself!
Setting the score to zero.
As you might have noticed, the score keeps adding up every time we play. The last thing
we have to do is add a data block which will reset the score every time we start the
game. Find the correct data block from the ‘Variables’ menu to ‘set Score to 0’. This
must be placed under the first ‘event’ block of the script. Did you add the block? Press
the ‘Go’ key to see if it works!
43