GoalDecide which sprites need code and which can be static objects.
New words
static object · a sprite that has no code, so it stays as it isbackdrop · the picture behind the spritescharacter · a sprite that moves, speaks or changes
Explanation
A story in Scratch has many sprites, but not every sprite needs code. A sprite with no code stays where it is and does not change. We call it a static object. A tree, a barn and the sun are often static objects. They make the scene. The characters that move, speak or change need a script. A script belongs to one sprite, and only that sprite follows it. Fewer scripts mean fewer places for mistakes. Plan with a table: sprite, does it need code, what does it do.
Worked examples
Sprite
Needs code?
What it does
Rooster
yes
wakes up the farm
Cow
yes
says “Moo!” when clicked
Barn
no
stays in place
Tree
no
stays in place
Sun
no
stays in place
Here is the plan for a farm story. Only two sprites need code.
The rooster and the cow each have their own script. The barn, the tree and the sun have none.
Two hat blocks start scripts in different ways. The first starts when the flag is clicked. The second waits until someone clicks the sprite itself.
Class activity
Puppet theatre (in groups): draw a scene on a big sheet, such as a park with a bench, a pond, a duck and a dog. Cut out the characters. Decide which ones will have “code”: a person moves them or speaks for them. The others are glued to the backdrop and are static. Write a plan table: sprite, needs code, what it does. Then perform the story. Did a glued object ever need to move? If yes, change your plan.
Practice
1
A pond scene has a frog that says “Ribbit!” when clicked, a duck that glides across the pond, a tree and a cloud. Which sprites need code? Which are static?
The frog and the duck need code. The tree and the cloud are static objects.
2
A sprite has no code. What does it do when the green flag is clicked?
Nothing. It stays where it is and looks the same.
3
This script belongs to the duck. You click the cloud. What happens?
Nothing. The cloud has no code, and the duck’s script belongs only to the duck. The duck glides only when you click the duck.
4
Why is it good to keep some sprites static?
There are fewer blocks to write and check, so the program is simpler and has fewer mistakes.