Scratch exercise 100

Helicopter challenge

In this exercise you will be shown how to create a helicopter sprite that moves realistically. You will then have to complete the game by adding your own ideas.


Complete these steps ..


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



2. Right-click the cat sprite under the stage and delete it.



3. Download and save these sprites, then use the "choose new sprite from file" button under the stage to add them to your to your game ..



4. Create these variables ("for all sprites") ..

These variables will be used to control the upwards and left-right movement of the helicopter, including acceleration and deceleration.



5. Select the stage thumbnail image, click the "scripts" tab, and add these scripts ..



6. Use "File>Save as" to save your game. Name it "Helicopter challenge".



7. Select the helicopter sprite and then click the costumes tab. Notice how the helicopter has costumes for flying and when it is hit by enemy fire.



8. Now add these scripts to the helicopter ..

Press "B" to test your game to see the animation of the helicopter rotor blades. Press "E" to end your game.



9. Add this script to the helicopter to control the upwards movement of the helicopter ..

Test your game again. Use the Up arrow key. Read the comments on the scripts above to learn what the individual blocks do.



10. Use "File>Save" to re-save your game.



11. Now add these two scripts to the helicopter to control the left-right movement of the helicopter ..

Test your game by using the Left and Right arrow key's, and once again read the comments on the scripts to learn what the individual blocks do.



12. Finally, add the usual firing scripts to the missile ..

NOTE how this script has an extra repeat loop to make the missile seek and find an enemy (such as an attacking helicopter). You will need to create a script an enemy and then complete the script by adding it's sprite name into the "point towards" script above.



12. Test your game and then re-save it.



13. Now it's your turn. Add attacking enemy helicopters and a ground to air missile that fires at you. Add other ideas of your own too.