Scratch game making tutorial 82

Christmas tree attack

In this tutorial you will create a game in which you (the cat) must collect presents from around a Christmas tree. Watch out though, the tree fires decorations at you!

Complete these steps ..


1. Create a new game file.



2. Select the stage and create the following variables (for all "sprites") ..

Hide the "decoration speed" variable and arrange the other two on the stage as shown here ..



3. Add these scripts to the stage ..

The "decoration speed" variable will allow you to control the difficulty of the game by setting the speed that the tree fires the decorations towards the Cat.



4. Re-name the cat sprite "Cat" and add the following scripts for setting his start properties, controlling his movements and losing lives ..



5. Use File>Save as to save your game. Name it "Christmas Tree Attack".



6. Download (right-click) and save the following 6 images, and then use the "Choose new sprite from file" button under the stage to add the them to your game ..









7. Rename the tree sprite "Tree", check the center point of the costume is in its middle and then add these scripts to it ..

Check that it is centred in the middle of the stage and if necessary adjust the Y script until it is.



8. Rename the present sprite "Present" and add these scripts to it ..

Note that these scripts cause the present to re-spawn at different locations around the tree after the Cat has collected it.



9. Re-save your game using File>Save.



10. Rename the decoration sprites "Red", "Green", "blue" and "Yellow".



11. Add these scripts to all 4 decorations ..



12. Re-save your game using File>Save.



13. You're done! Re-save your game then press "B" or click the Green Flag to test it.



14. Can you improve it? What else could you add?