Getting Started Guide

CLASS 4
48
Mole game variable coding
Mole game variable coding
Did you make all the sound file necessary?
Then let’s make a script for the activation of the game.
In the mole game, every time you press the infrared sensor, the 'score' will increase by one point. And each
infrared sensor has to be pressed within a certain 'time.' Here we have to use variables, such as ‘Run’, “Score’,
‘Time’. You can simply think of variables as storage space.
Click on the variable tab and make variable
Click the (make variable) button to make variable.
Make a variable like the picture above. Here, ‘Action’ is activation, ‘Score’ is score, and ‘Timeout’ is responsible for
representing time. If you made all the variables above, you have all materials you need! We are going to utilize
these materials on the next page!
Mole game coding activity