Page 97 - Trackpad_V1_Book 5_Flipbook
P. 97
when I receive SpinningStopped
if touching color ? then
set winner to Red
if touching color ? then
set winner to Green
if touching color ? then
set winner to Blue
if touching color ? then
set winner to Yellow
MORE BLOCKS broadcast SpinningStopped
Step 1 Drag a broadcast block and click on the New
Message. New message
SpinningStopped
Step 2 Type YouareWinner in the New variable
name box.
After adding all the blocks, make the sprite (cat) active and add the following code:
when clicked when I receive YouareWinner
go to x: 100 y: -100 say Winner for 2 seconds
uiz Bee Under which block we can create a variable?
______________________________________________________
Creating Game in Scratch 95

