Scratch game making tutorial 90c

Ghost hunter advanced

In this tutorial you will make a game in which a Hunter (the cat) chases a ghost which fades in and out as it moves. When the ghost is caught it flashes red, disappears and then re-appears later at a random place on the stage.

You will also add a "Ghosts caught" counter.

Note: If you have already complete Ghost hunter simple you can use that game and just change the scripts on the ghost sprite.

Complete these steps ..


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



2. Select the stag thumbnail image under the stage, the select the "Backgrounds" tab, then select "edit" and Paint the stage black.

Now click the "scripts" tab and add these scripts to the stage ..



3. Next, select the cat sprite under the stage and re-name it "Hunter".

Now click on the middle button next to the cat thumbnail image to make sure the cat only faces left and right ..



4. Add these scripts to the cat to set his size and to control his walking with the arrow keys ..



5. Use "File>Save as" to name your game "Ghost hunter" and to save it ..



6. Click the "Paint new sprite" button under the stage and paint a white ghost in any way you want ..

When you have finished, click OK. Re-name the sprite "Ghost 1".

Now click the "copy" button and then "edit" and fill your 2nd costume with red so you have 2 costumes like this ..

Re-name the white costume "moving" and the red one "caught".



7. Select "Variables" ..

... and create a new variable "for all sprites" and call it "Ghosts caught".

Position it in a corner of the stage.



8. Add these scripts to the ghost ..



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



10. How about duplicating your ghost so you have 5 or 6 to hunt?



11. You've finished, well done! Press the "b" key or click the green flag to test your game.