Animate a ghost Part-1
Animate a ghost
Creating a new Scratch project
You can use Scratch online or offline.
Online - to create a new Scratch project using the online editor, go to rpf.io/scratch-new
Offline - if you prefer to work offline and have not installed the editor yet, you can download it from rpf.io/scratch-off
The Scratch editor looks like this:
- The cat sprite that you can see is the Scratch mascot. If you need an empty Scratch project, you can delete the cat by right-clicking it and then clicking delete.
Click Choose a sprite to see the library of all Scratch sprites.
You can search or browse sprites by theme. Click on a sprite to add it to your project.
- Click on Choose a Backdrop in the bottom right.
- You can search for a backdrop or browse for one by category or theme. Click on a backdrop to select it.
Add code to your ghost sprite so that the ghost appears and disappears forever when the green flag is clicked.


PART 2
Code for catching ghosts
Can you make your ghost disappear when it’s been caught? The player should be able to click ghosts to catch them.
Add a score
Click on Variables in the Code tab, then click on Make a Variable.
Type in the name of your variable. You can choose whether you would like your variable to be available to all sprites, or to only this sprite. Press OK.
Once you have created the variable, it will be displayed on the Stage, or you can untick the variable in the Scripts tab to hide it.
Can you keep track of the player’s score? Players should score points when they click on ghosts to catch them.
Each time a player clicks on a ghost, their score should increase.
When the green flag is clicked
, your score
variable should be set to 0
. The Stage is the best place to add this code.
When the ghost sprite is clicked
, the score
variable should be changed by 1
.