Scratch game making tutorial 87

Dressing up

In this tutorial you will make a game in which the player can choose clothes for a doll.

 

Complete these steps ..

 

1. Create a new game (From the top menu choose File>New).

 

2. Right-click and delete the cat sprite.

 

3. Start by creating the following variables ("for all sprites") ..

 

4. Add these scripts to the stage ..

Notice how dress x, shoe x, and hat x are spaced 100px apart horizontally across the screen (-50, 50, & 150).

 

5. Use the "Choose new sprite from file" button under the stage ..

.. to download, save and then load this doll sprite ..

Rename the sprite "doll".

 

6. Now do the same for the 3 dresses, this time renaming each Dress 1, Dress 2, Dress 3 ..

 

7. Save your game using File>Save as. Call it "Dressing up".

 

8. Now do the same for the shoes, this time renaming each Shoes 1, Shoes 2, Shoes 3 ..

 

9. Now do the same for the hats, this time renaming each Hat 1, Hat 2, Hat 3 ..

 

10. Re-save your game this time using File>Save

 

11. Add these scripts to the doll ..

The x position of the doll is held in "doll x" and the y position in "doll y". We will use these values to help direct the clothes to their correct positions on the doll.

 

12. Add these scripts to Dress 1 ..

The 3 dresses need very similar scripts but each dress has slightly different "which dress?", set size and y values.

 

13. Add these scripts to Dress 2 (if you like, duplicate the Dress 1 scripts and then edit them) ..

 

14. Add these scripts to Dress 3 (if you like, duplicate the Dress 1 scripts and then edit them) ..

 

15. Re-save your game.

 

16. Using what you have learnt from the Dress scripts, add these scripts to the shoes ..

 

17. Re-save your game.

 

18. Using what you have learnt from the Dress and Shoes scripts, add these scripts to the hats ..

 

19. You're done! Save your game again then press "B" or click the Green Flag to start your game and then click the dresses, hats and shoes to dress the doll.

 

20. Can you improve the game? What else could you add?