Scratch exercise 11

Scratch cat and code blocks video screenshot Scratch coding video lessons

Our Scratch coding online video lessons are an ideal way for your child to experience our lessons at home.
Try a FREE lesson.

Simple collision 1 - cat and ball

In this tutorial you will make the Cat sprite react when a moving ball touches it.


Complete these steps ..


NOTE: You can use any version of Scratch.


Complete these steps ..


1. Open Scratch, OR create a new game (from the top menu choose "File>New").



2. Use the "Paint new sprite" button under the stage to paint a simple ball sprite.

Use the ellipse (circle tool) tool and hold down the shift key as you drag to make a perfect circle ..



3. Re-name the ball sprite "ball" and then add this code to it ..



4. Re-name sprite1 "Cat" ..


Click the "only face left right" button ..

If you are using Scratch desktop add this code ..


5. Now add this code to the Cat to allow the player to end the game by pressing the "E" key and to set the cats properties (positon and size) ..


Now add the code to make the Cat run left and right and to react when hit by the ball ..



Press "B" on your keyboard and then the arrow keys to test your game.

Press the "E" key to end it when you are ready to continue working on your game.



6. Use the File menu to save your game. Name it "Cat and ball v1".



7. You have finished this tutorial, well done!

Can you change the speeds of the Cat and ball?