First do all the steps following the online tutorial…

- Add a Backdrop
- Add a Sprite
- Move Right & Left with Arrow Keys
- Move Up & Down with Arrow Keys
- Add another sprite
- Move randomly
- In octopus sprite, when touching play sound
- Create score variable
- In octopus sprite, when touching add score
Then change it into a catching game by doing the following…

SAVE A COPY
First go to File>Save as a Copy… rename it to “Catch Game”

CHANGE SPRITES & BACKDROP
- Octopus sprite: go to Costumes and choose a different sprite (ie. Bowl). Then rename it.
- Star sprite: go to Costumes and choose a different sprite (ie Apple). Then rename it.
- Backdrop: change backdrop to something simple, easy to see fruit & bowl.

FALLING FRUIT
First, delete forever/glide loop from Flag event.
Now we need to make the fruit start along the top of the screen. Add:
- Go to ‘random position’
- Set y to ‘180’

To help you understand why we set Y to 180, look at this tip about the stage size…

So now click on the green Flag and the fruit should be along the top of the screen somewhere…

- Take what you already have and put it inside an IF-THEN block…
- Test if it’s is close to the bottom (-170).
- If y position < -170, then it should move back to the top in a random position

Make it go down a bit at a time
- change y by ‘ -5’ and put it inside the forever loop at the top

CATCHING IT
We need to set the fruit back to the random top position whenever we catch it.
- First move the code for touching the fruit into the bowl sprite’s code…
- and delete from the bowl.
So bowl just has arrow key actions…

For the fruit should have 2 separate Flag actions…
- change the touching to ‘bowl’…
- also load ‘Pop’ sound and play that instead of ‘Wand’ sound….

Add the following inside the IF TOUCHING loop, so when you’ve collected the fruit, it disappears and jumps to the top of the screen again.
- Go to ‘random position’
- Set y to ‘180’

SCORE: START AT 0
Before the forever loop for the fruit, add a Set Score action…

BONUS POINTS
Duplicate the apple sprite and go into Costumes – change the fill color with the Paint Bucket


In the code, change score by ‘2’ instead of ‘1’.

VICTORY MESSAGE
New sprite – make it text. Type out text “You Win” with a nice font, and resize so fills canvas.


In the code for this sprite, have it only show when the score reaches ‘10’. And stop everything (no more falling fruit)…
