Scratch game making tutorial 33

 

Random falling

In this tutorial you will make a game in which the Cat must dodge falling balls.

Complete these steps ..

 

1. Create a new game. Either open Scratch or if it is already open choose "File>New" ..

 

Now select the stage and add these scripts to it ..

 

 

2. Click the "Paint new sprite" button under the stage and paint a small ball either by using the paint bush tool or by holding down shift and using the circle tool ..

Re-name it "ball 1".

WARNING: If your ball is too big it will get stuck to the edge of the stage.

 

 

3. Add these scripts to Ball 1..

These scripts will make the ball go to a random X position along the top of the stage before waiting a random time and then fall.

 

 

4. Duplicate (copy) "ball 1" twice, and re-name the copies "ball 2" and "ball 3", then change their colours with the Paint bucket tool so each is a different colour.

 

 

5. Select the cat (sprite1) under the stage and rename it "Cat".

 

 

6. Add these scripts to the Cat ..

 

 

7. Press the "B" key to test your game. Use the left and right arrow keys to move your Cat. Press the "E" key to end your game.

 

 

8. Go to "File > Save as" and save your game. Name it "random falling"