Scratch exercise 51b

Football - intermediate 1

It this exercise you will create a game in which a striker must get past a defender to score a goal.

 

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. Download, save and then open this game file ..

 

 

3. Add this code to the stage ..

 

 

4. Select the striker sprite and then create this variable ..

 

You will use this variable to let the ball know which direction the striker is moving in when it kicks the ball.

 

Add this code to the Striker ..

 

If you are using Scratch Desktop add this code ..

 

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.

 

 

5. Add this code to the Defender ..

 

If you are using Scratch Desktop add this code ..

 

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 "Football intermediate 1 v1" ..

 

 

7. Add this code to the ball ..

 

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.

 

 

8. Select the "Goal posts" sprite and then drag it on the stage to position it on the goal line like this ..

 

Add this code ..

 

 

9. Select the Goal! sprite ..

 

Add this 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.

 

 

10. Use the File menu to save your game.

 

 

11. Well done. You've finished! Can you add a scoring system? Or alternatively, complete the Striker-Advanced Challenge.