Page 276 - Scratch Programming Playground
P. 276
the Crab sprites subtract 1 from Apples Collected and
say “Got one!” when they touch the player. If the player has
0 apples, the Crab sprites will say “apples!” but will not sub-
tract 1 from Apples Collected.
the game will be a bit more exciting with two crabs,
so right-click the Crab sprite in the Sprite List and select
duplicate from the menu.
Save Point
Click the green flag to test the code so far. Make sure the
two crabs are jumping around. When they touch the cat, they
should steal an apple and say “Got one!” If the cat doesn’t have
any apples, the crabs should just say “apples!” then click the
red stop sign and save your program.
20. Add the Time’s Up Sprite
We’re almost done! the last thing we need to add to the game
is a timer. the player will be under pressure to grab apples as
250 Chapter 9

