Getting Started Guide
CLASS 4
46
Mole game activation coding
Broadcast the mole game
Mole game coding activity
Once the IR sensor connected to digital port 3 is pressed, the signal announcing the start of the game must be
sent. At this moment, we use the “Broadcast” block. “Broadcast” in Scratch means it’s sending a signal. If you send
a signal, you must receive it, right?
The figure above is the script with ‘broadcast’ block added. Now it waits until the digital 3 sensor value becomes
true and then activate the ‘broadcast’ block.
When “start” is broadcasted, it must be received. The figure above is the “when receiving start’ block. Below that
is the script that must be activated.
Therefore, if you put your hand on the digital 3 sensor, the ‘start’ is broadcasted, and it is received to activate
the script.
script