Scratch exercise 60

Domino effect

In this game you will make the cat walk around and cause 4 balls to bounce around the stage.


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. Right-click on the cat sprite beneath the stage and re-name it "Cat" ..

 

Click the "only face left right" button ..

If you are using Scratch desktop add this code ..

 

 

3. Add this code/scripts to the cat ..

 

 

4. Press the "B" key to try out the arrow keys. If your cat is walking OK press "E" to end.

 

 

5. Use the FIle menu to save your game. Name it "Domino effect v1" ..

 

 

6. Click the "paint new sprite" button under the stage and paint an orange ball. You can use the biggest paint brush size to do this with one click ..

 

Click "OK", and re-name it "ball 1" then click on the code/scripts tab and add this code/script to it ..

 

 

 

Press the "B" key on your keyboard to test your game. Use the arrow keys to make your cat touch the orange ball. The ball should bounce around the stage.

When you are ready, press the "E" key to end your game and continue working on it.

 

 

7. Now right-click "ball 1" under the stage to duplicate (copy) it ..

 

 

8. Make 4 balls and name them so you have "ball 1", "ball 2", "ball 3", and "ball 4".

Edit their costumes so that each ball is a different colour.

 

 

9. Change the script for "ball 2" so it moves when it is touching "ball1".

 

Change the script for "ball 3" so it moves when it is touching "ball 2".

 

Change the script for "ball 4" so it moves when it is touching "ball 3".

 

Press the "B" key on your keyboard to test your game. Use the arrow keys to move the cat towards the orange ball ("ball 1"). Watch how the balls interact with each other.

When you are ready, press the "E" key to end your game and continue working on it.

 

 

10. Use the File menu to save your game.

 

 

11. Well done. You've finished. Can you change the speed and distance for each ball?