Hardware Reference
In-Depth Information
Double-click the cat sprite on the stage to return to editing its scripts. he script you created
for the Cheesy-Pufs sprite will disappear, but don't worry—it's still saved but only appears
when you're editing that particular sprite.
Drag another if block from the Control palette along with another touching ? sensing
block, and this time, change the Sensing block so both blocks together read if touching
Sprite2? . Into this block, insert a wait 1 secs Control block with the value changed to
2 and a say Hello! for 2 secs Looks block with the message changed to read Yum-
yum-yum! . Finally, drag the whole stacked block up so it connects to the bottom of the
existing when right arrow key pressed block, beneath the move 10 steps block.
he inal code for the cat sprite should look like the blocks in Figure 10-10.
Figure 10-10:
he completed
code for the
simple Scratch
game's cat sprite
If you move the cat towards the Cheesy-Pufs with the right-arrow key on the keyboard, the
game starts. When the cat reaches the Cheesy-Pufs, the dialogue exchange takes place and
the bowl should disappear.
Search WWH ::




Custom Search