Learning Goals 3 min
By the end of this lesson you will be able to:
- Point to the green flag and the red stop sign above the Stage.
- Explain that
when flag clickedwaits for the flag, then runs everything below it. - Click the stop sign mid-script and watch a slow stack of moves freeze on the spot.
Warm-Up 7 min
You can find any block now. But every script you have built so far finishes in a blink — too fast to watch, and far too fast to stop. Today you slow the cat down, then learn the button that halts it.
Quick-fire puzzle
Wei Jie built this stack and clicked the green flag once. How does the cat behave?
when flag clicked
move (20) steps
move (20) steps
move (20) steps
move (20) steps
move (20) steps
Reveal the answer
The cat moved 100 steps in what looked like a single jump. Scratch ran the five blocks top to bottom so quickly that your eye never caught the middle. The cat’s x went 20, 40, 60, 80, 100 — but you only saw the end of it.
Five blocks, no pauses, nothing to see. That is the problem today’s lesson solves.
New Concept — start, slow down, stop 15 min
Think of a school race. The teacher waves a green flag and everyone runs. The teacher blows a whistle and everyone stops. Scratch has exactly those two signals, sitting side by side just above the Stage.
The two buttons
| Button | Where | What it does |
|---|---|---|
| Green flag | above the Stage, on the right | Starts every script that begins with when flag clicked. |
| Red stop sign | right beside the green flag | Halts every running script at once. Sprites freeze exactly where they are. |
Hat blocks listen for events
A hat block has a rounded top and can only sit at the very top of a stack. Its only job is to wait for something to happen, then let the blocks underneath run.
when flag clickedwaits for the green flag.- Other hats wait for a key press or a sprite click — you meet those in Lessons 16 and 17.
- A stack with no hat just sits there. Click the flag and nothing happens: it never got a go signal.
The new block: wait
Here is the block that makes the stop sign worth having. wait (1) seconds lives in the soft-orange Control category. It pauses a script for as long as you tell it, then carries on.
Drop a wait between two moves and the cat stops teleporting — it strolls. And a strolling cat is one you can actually catch with the stop sign.
The number can be a decimal. 0.5 is half a second, 0.1 is a flicker, 3 is a long dramatic pause.
What happens when you click the flag
- You click the green flag above the Stage.
- Scratch calls out “flag clicked!” to every sprite.
- Every
when flag clickedhat in the project wakes up. - The blocks under each hat run top to bottom, pausing at each wait.
Why it matters
Your scripts are about to get long — a stroll, a dance, a chase. When something goes wrong, and it will, you need an instant kill switch. That is the stop sign, and knowing it is there makes Scratch safe to experiment in.
Worked Example — build a slow walk, then halt it 15 min
Open your project. Today we build a deliberately slow script, so the stop sign finally has something to interrupt.
Step 1 — Drag the hat block
From the yellow Events category, drag when flag clicked into the Script Area.
Step 2 — Snap four move blocks underneath
From the blue Motion category, snap four move (10) steps blocks under the hat. Click the flag now — the cat jumps 40 pixels instantly. Blink and you miss it.
Step 3 — Slide a wait between each move
Now the trick. Click the soft orange Control dot and drag wait (1) seconds into the gaps, so the stack alternates: move, wait, move, wait, move, wait, move.
when flag clicked
move (10) steps
wait (1) seconds
move (10) steps
wait (1) seconds
move (10) steps
wait (1) seconds
move (10) steps
Step 4 — Click the green flag
Watch the Stage. Hop. Pause. Hop. Pause. Four hops and three waits, about three seconds altogether. Same 40 pixels as before, but now you can actually see it happen.
Step 5 — Run it again, then hit the stop sign
Click the flag, then after the first or second hop click the red octagon. The cat freezes right there. The remaining moves never run at all.
Step 6 — Check where it stopped
Look at the x box in the Sprite Properties bar. If you caught the cat after two hops it reads 20 more than where you started. The stop sign did not rewind anything — it simply stopped time.
What changed: the same four moves that used to be invisible are now a walk you can watch, interrupt, and measure. Adding time to a script is what makes it feel alive.
The full assembled stack (your reference)
when flag clicked
move (10) steps
wait (1) seconds
move (10) steps
wait (1) seconds
move (10) steps
wait (1) seconds
move (10) steps
Try It Yourself — three small builds 12 min
Goal: Make the cat hop three times, a second apart. Run it once all the way through. Then run it again and stop it after the first hop.
when flag clicked
move (30) steps
wait (1) seconds
move (30) steps
wait (1) seconds
move (30) steps
Think: without the waits, all three moves happen in one instant. The waits are what give your finger a window to land on the stop sign.
Goal: Give the walk a rhythm. Make the first pause short and the second one long, so the cat hurries, then dawdles.
when flag clicked
move (30) steps
wait (0.5) seconds
move (30) steps
wait (2) seconds
move (30) steps
Think: the number inside wait (1) seconds can be a decimal. Try 0.1 for a flicker or 3 for a long dramatic pause. Timing is how animation gets its personality.
Mini-mission: the sniper stop. Wei Jie bets you cannot freeze the cat on an exact spot. Set the cat’s starting x to -100, build a slow shuffle, and try to stop it with x reading exactly -80.
It works if: after you hit the stop sign, the x box reads exactly -80. Write down three attempts and your closest result. Use no more than 8 blocks.
when flag clicked
move (5) steps
wait (1) seconds
move (5) steps
wait (1) seconds
move (5) steps
wait (1) seconds
move (5) steps
Think: starting at −100 and needing −80 means 20 pixels of travel. With 5-step hops that is exactly four hops — so the real question is whether you can stop after the fourth and before anything else.
Mini-Challenge — the freeze game 5 min
“Aisyah’s musical statues”
Send the cat on a slow walk across the Stage. A partner shouts “FREEZE!” at a moment of their choosing, and you must halt the cat before its next hop. Where it lands is your score.
It works if:
- You use only blocks from today’s lesson and Lesson 1.
- The cat moves at least three times when nobody shouts.
- The walk is slow enough that a shout gives a real chance to react.
- You can show the cat freezing mid-walk on the red stop sign.
Reveal one valid solution (teacher)
One-second waits give a comfortable shouting window; four hops of 20 steps gives four chances.
when flag clicked
move (20) steps
wait (1) seconds
move (20) steps
wait (1) seconds
move (20) steps
wait (1) seconds
move (20) steps
Score by the cat’s final x. Nearer the start means a quick finger; nearer the end means the cat almost got away.
Recap 2 min
Today you met the two buttons above the Stage. The green flag starts every script that begins with when flag clicked; the red stop sign halts everything at once. You also met wait (1) seconds, the small Control block that turns an invisible teleport into a walk you can watch.
- Green flag
- The button above the Stage that starts every script beginning with a flag hat block.
- Stop sign
- The red octagon beside the flag. One click halts every running script at once.
- Hat block
- A block with a rounded top that sits at the top of a script and waits for an event.
- wait (block)
- A Control block that pauses a script for a number of seconds — decimals allowed.
Homework 1 min
Catch the Cat. Walk the cat in from the left edge and try to freeze it exactly on the centre spot. Three attempts, and write down how close you got each time.
- Set the cat’s x to
-200in the Sprite Properties bar. - Build the stack below — three hops with a second between each.
- Click the flag, then hit the stop sign as near to
x = 0as you can manage. - Read the x box and write the number down. Reset to
-200and try twice more.
when flag clicked
move (40) steps
wait (1) seconds
move (40) steps
wait (1) seconds
move (40) steps
Bring back next class:
- A screenshot of your Script Area showing the seven-block stack.
- Your three attempts written out: “Attempt 1: x = ___. Attempt 2: x = ___. Attempt 3: x = ___. Closest to 0 was ___.”
Heads up for next class: SCR-L01-05 shows you how to add a second sprite from the library — the cat is about to get company.