Scratch exercise 55

Football striker dribbles and shoots

It this exercise you will create a footballer sprite who can collect a ball, dribble it, and then shoot in the direction of the mouse pointer when the space bar is pressed..

 

1. Create a new Scratch game .. File>New ..

 

2. Select the cat sprite underneath the stage delete it.

 

3. Click on these 2 costumes for your footballer, save each of them to your computer (desktop?) ..

 

4. Import striker-1-a.gif as a sprite ("Choose new sprite from file" button under the stage) ..

 

5. Name this sprite ("Striker", "Messi", Rooney"?).

 

6. Click on the costume tab and import striker-1-b.gif for your second costume ..

 

7. Now paint a ball. Use the circle tool and hold down the shift key to draw a perfect circle ..

If you like you can import an image of a real ball. If you do, then copy it's costume and rotate each so you can simulate it rotating when kicked ..

 

6. Save your game.

 

7. Add these scripts to the Striker ..

Press the "B" key to test your scripts. Press the "E" key to stop and continue work on your game.

 

10. Add these scripts to the ball. You may need to adjust the "set size" script block value ..

 

11. Next, paint your stage background to look like a football pitch.

 

14. Press the "B" key to start your game. Move your mouse on the stage and practice kicking the ball towards the goal posts.

 

15. Press the "E" key to stop your game.

 

16. Well done. You've finished. Now save your game using "File>Save as". Remember to give it a name you will remember like "Footballer dribbles".