Scratch exercise 12

Simple collision 2 - coloured square

In this tutorial you will make a square sprite change colour when the cat sprite touches it.

 

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. Select the cat sprite under the stage and re-name it "Cat".

 

 

3. Click the "only face left right" button ..

If you are using Scratch desktop add this code ..

 

Add this code to allow the player to end the game by pressing "E" on their keyboard, and to set the Cats properties ..

 

Add the code to allow the player to move the cat sprite with the arrow keys on their keyboard ..

 

Press the "B" key on your keyboard to test your game.

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

 

 

4. Paint a new sprite. Make a simple square ..

 

 

5. Re-name the square button "square" and add these scripts/code to it ..

 

Press the "B" key on your keyboard to test your game.

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

 

 

6. Use the File menu to save your game. Name it "Colour button v1" ..

 

 

7. Well done, you've finished this tutorial.