Learning Goals 3 min
By the end of this lesson you will be able to:
- Predict what a Level-2 stack will do before clicking the flag — covering conditionals, comparison operators, sensing, broadcasts, variables, and clones.
- Name the eight clusters of Level 2 and give one example block from each, so you have a mental map of where to look when you forget something.
- Use the L3 Cold-Memory Reference Card at the bottom of this lesson to check that the L2 blocks you'll need every week from now on are still rock-solid in your head.
Warm-Up — predict before you click 10 min
Level 3 doesn't reteach Level 2 — it uses Level 2 as the floor. Before we add anything new, let's check the floor is still there. Look at each stack, say (or write) what happens when the flag is clicked, then peek at the reveal. No clicking allowed.
Puzzle 1 — the conditional
when flag clicked
forever
if <key [space v] pressed?> then
say [Boom!] for (0.5) seconds
else
say [Quiet.] for (0.5) seconds
end
end
Reveal puzzle 1
The sprite says "Quiet." over and over (in 0.5-second bubbles) while the space key is not pressed. The instant you hold space, it flips to "Boom!" every half-second. The if <> then else always picks exactly one branch — never both, never neither — so there's always a speech bubble on screen. (L02-06, L02-07.)
Puzzle 2 — the comparison
when flag clicked
set [score v] to (0)
forever
if <(score) > (5)> then
say [You win!] for (2) seconds
stop [all v]
end
change [score v] by (1)
wait (0.5) seconds
end
score already exists.Reveal puzzle 2
The variable counts up by 1 every half-second: 1, 2, 3, 4, 5, 6. The check is () > () — strictly greater than — so the win triggers when score reaches 6, not 5. After "You win!" the stop [all v] kills the script. If Daniel wanted the win at 5 he'd use () = () or () > () with 4 on the right. (L02-08, L02-31.)
Puzzle 3 — the broadcast
when flag clicked
say [Ready?] for (1) seconds
broadcast [start race v]
when I receive [start race v]
move (200) steps
Reveal puzzle 3
The cat says "Ready?" for one second, then broadcast [start race v] fires. The second script (a different hat) is listening — it triggers and the cat zooms 200 pixels right. Two scripts, one sprite, talking to each other through a named message. The same broadcast on any sprite that has a when I receive [start race v] hat will also fire — that's how you start ten sprites at once. (L02-20, L02-21.)
New Concept — your map of Level 2 14 min
Level 2 had 48 lessons. Nobody remembers 48 separate things — your brain doesn't work like that. Instead, those 48 lessons clumped into eight clusters, each one teaching a single big idea. If you can name the eight clusters, you can find any L2 block you need by walking through the map.
The eight L2 clusters
| Cluster | Big idea | One block from this cluster |
|---|---|---|
| A · Multi-sprite basics | More than one sprite in one project. Each has its own scripts, costumes, properties. | switch costume to [costume2 v] |
| B · Conditionals | The if-then C-block. Run blocks only sometimes, only when a question is true. | if <> then else |
| C · Sensing | Asking the world questions — touching, colour, mouse, keys. | touching [edge v]? |
| D · Broadcasts | Sending named messages so sprites can talk to each other. | broadcast [start v] |
| E · Animation | Costume loops, graphic effects, walking cycles. | next costume |
| F · Variables | Numbers (and text) you store and change — score, lives, name. | change [score v] by (1) |
| G · Game loops | Falling apples, catch-and-reset, game over — putting it all together. | forever |
| H · Sharing & debugging | Reading other people's stacks, finding bugs, uploading to scratch.mit.edu. | (no single block — a habit) |
Why this map matters in L3
Level 3 doesn't add new clusters — it goes deeper into the same eight. Today's cluster A in L3 (Recap & Operators Deep Dive) zooms inside cluster F's variables and cluster B's conditionals from L2. Next term's cluster on custom blocks zooms inside cluster D's broadcasts. You're not learning new clusters. You're learning to see inside the ones you already know.
One question per cluster
Say the answer in your head, then read on. If three or more catch you off-guard, please re-skim SCR-L02-48 (the Level 2 Recap) before continuing — it has every answer with a worked example.
- A: If sprite Cat has a when ⚑ clicked + move (50) steps, and sprite Dog has the same, what happens? (Both move 50 steps at the same instant — sprites run in parallel.)
- B: Inside a forever, what's the difference between if <> then with one body, and if <> then else with two bodies? (If-then might run nothing; if-else always runs exactly one of the two branches.)
- C: What shape are sensing question blocks like touching [edge v]?? (Hexagonal — they fit into the diamond slots of if-then and the logic operators.)
- D: A broadcast is fired on Sprite A. Sprite B has a when I receive hat for that same message name. Does Sprite B's script run? (Yes — broadcasts are heard by every sprite, every script, with a matching when-I-receive hat.)
- E: To make a walking animation, you alternate move (10) steps with what? (next costume, usually inside a loop.)
- F: What's the difference between set [score v] to (0) and change [score v] by (1)? (Set replaces; change adds. Use set at the start of the game; change while playing.)
- G: In a catch-the-apple game, where does the "did the basket catch it?" check live? (Inside the apple's forever, in an if-then with touching [Basket v]?.)
- H: Why share your project on scratch.mit.edu instead of just emailing the
.sb3? (So others can remix it, comment on it, and so you can see who plays it.)
Clones — the cluster-F follow-up
Clones came up in cluster G of L2 (lessons 37–43) — falling-apples and catch-the-kuih needed many copies of one sprite. Quick reminder:
when flag clicked
forever
create clone of [myself v]
wait (1) seconds
end
when I start as a clone
go to x: (pick random (-200) to (200)) y: (180)
glide (2) secs to x: (x position) y: (-180)
delete this clone
The clone hat when I start as a clone is its own little hat block — separate from the green-flag hat. Every clone runs the clone-hat script independently. This is why clones felt magical in L2-37 — you wrote one script and got ten apples falling at once.
Worked Example — read & predict "Catch the Kuih Lite" 12 min
Open this stack in your head — don't open Scratch yet. We'll walk through every block, top to bottom, and you'll predict what happens before peeking at the answer. This is the exact reading skill L3 will demand every lesson.
Step 1 — meet the sprites
Two sprites in the project: Kuih (a small kuih sprite, used as the falling object) and Basket (a basket sprite at the bottom of the Stage, dragged left/right by the mouse). Two variables: score (for all sprites) and lives (for all sprites).
Step 2 — read the Basket's script
when flag clicked
set [score v] to (0)
set [lives v] to (3)
forever
go to x: (mouse x) y: (-140)
end
The Basket is the boss script — it owns the reset (cluster F) and the input handling (cluster C). The basket stays at y: −140 always.
Step 3 — read the Kuih's spawner
when flag clicked
hide
forever
create clone of [myself v]
wait (1) seconds
end
Cluster G clone pattern. The original kuih sprite never falls — it's just the spawner. Every clone is a separate falling kuih.
Step 4 — read the Kuih's clone script
when I start as a clone
show
go to x: (pick random (-200) to (200)) y: (160)
repeat until <touching [Basket v] ?>
change y by (-5)
if <(y position) < (-170)> then
change [lives v] by (-1)
delete this clone
end
end
change [score v] by (1)
delete this clone
Look at the C-block stack:
- repeat until <> with touching [Basket v]? as the condition — fall until the basket touches.
- Inside the loop, fall 5 pixels per frame and check the floor (() < ()) — if past the floor, lose a life and delete the clone.
- After the loop ends (which means basket caught it), add 1 to score and delete the clone.
Step 5 — predict before clicking
Without running it — what happens when the flag is clicked? Pause and answer in your head before reading on.
Step 6 — peek at the answer
The Basket follows your mouse along the bottom. Every second a new kuih appears at a random x near the top and falls. If your basket catches it: score +1, kuih disappears. If it falls off the floor: lives −1, kuih disappears. There's no game-over yet — the score and lives just keep ticking until you stop the flag.
Step 7 — find the missing piece
This script has no game-over check. Where would you add one? (Inside the Basket's forever, an if <> then with () = () checking lives against 0, then say [Game over!] and stop [all v].)
Step 8 — the assembled mental model
You just read four scripts across two sprites and predicted the behaviour without clicking. That's the L3 reading skill. Every lesson from now on assumes you can do this on a stack you've never seen before.
What you just proved: you can read a multi-sprite, multi-script, clone-based game and predict its behaviour cold. The L2 floor is solid.
Try It Yourself — three predict-before-click drills 15 min
Goal: Read this stack and predict what the cat does. Then build it in Scratch and check. (Don't reverse the order — predict first.)
when flag clicked
set [count v] to (0)
forever
if <key [up arrow v] pressed?> then
change [count v] by (1)
say (count) for (0.3) seconds
end
end
Think: The variable doesn't reset between presses, so each tap of the up arrow bumps it: 1, 2, 3… The forever means the if-then is checked every frame, so holding the arrow makes the number climb fast. This is the basic pattern behind every "score increments on action" game.
Goal: Build two sprites — a Cat and a Dog. The Cat says "Mari mula!" then broadcasts start. The Dog has a when I receive [start v] hat that makes it glide across the Stage. Predict the order of events before clicking.
when flag clicked
say [Mari mula!] for (1) seconds
broadcast [start v]
when I receive [start v]
glide (2) secs to x: (200) y: (0)
say [Selesai!] for (1) seconds
Think: Cat says "Mari mula!" for one second, then fires the broadcast in the very next frame. The Dog hears it instantly and starts gliding. Two seconds later the Dog says "Selesai!". The Cat's job is finished after the broadcast — it just stands there while the Dog moves.
Goal: Read this clone-heavy stack and predict two things — (1) how many clones exist on screen 5 seconds after the flag, and (2) what happens when the spacebar is held. Then build and test.
when flag clicked
hide
forever
create clone of [myself v]
wait (0.5) seconds
end
when I start as a clone
show
go to x: (pick random (-220) to (220)) y: (pick random (-160) to (160))
forever
if <key [space v] pressed?> then
hide
else
show
end
end
Think: A new clone spawns every 0.5 seconds, and clones never delete themselves — so after 5 seconds there are about 10 clones scattered across the Stage. Each clone's own forever watches the spacebar. Holding space hides every clone at once (because every clone runs its own copy of the same check). Letting go shows them all again. This is the "screen-full of bats that vanish when you hide" pattern — and it's the seed of L3's clone deep-dive.
Mini-Challenge — Priya's broken broadcast 5 min
"Why is nothing happening?"
Priya wants the Cat to say "Tiga, dua, satu, mula!" and then start the Dog running across the Stage. She writes this and clicks the flag — the Cat counts down fine, but the Dog never moves. The console shows no errors.
when flag clicked
say [Tiga] for (1) seconds
say [Dua] for (1) seconds
say [Satu] for (1) seconds
say [Mula!] for (1) seconds
broadcast [Start Race v]
when I receive [start race v]
move (200) steps
say [Selesai!] for (1) seconds
What's the bug — and how would you fix it in 10 seconds?
Reveal one valid solution
The broadcast name on the Cat is Start Race (capital S, capital R). The when-I-receive on the Dog is start race (all lowercase). Scratch's broadcast names are case-sensitive on creation. When Priya dropped the broadcast block, she typed a new name, which Scratch saved as a brand-new message — distinct from the lowercase one the Dog is listening for.
The fix: click the dropdown arrow on the broadcast block and pick start race from the existing list (don't type). Or rename one of the two to match the other exactly. Once they match, the Dog hears the message and runs.
The lesson here: always pick broadcast names from the dropdown, not by typing. L2-23 covered this exact bug. It bites every Scratch programmer at least once.
Recap — the L3 Cold-Memory Reference Card 3 min
You named the eight L2 clusters, predicted three stacks before clicking, read a four-script kuih-catching game, and spotted Priya's broadcast bug. From here on, everything below is what Level 3 assumes you remember cold. Print this list. Tape it to your monitor. We will not be reteaching any of it.
- Conditional (if-then, if-then-else)
- The if <> then C-block runs its body only if the diamond reports true. The if <> then else version always runs exactly one of two bodies. (L02-06, L02-07.)
- Comparison operator
- The three green hexagonal blocks () = (), () < (), () > (). Compare two numbers (or two strings). Report true or false. Plug into any diamond slot. (L02-08.)
- Sensing question
- Any hexagonal block in the Sensing palette — touching [edge v]?, key [space v] pressed?, touching color [#ff0000] ?, mouse down?. Ask the world a yes/no question. (L02-12 to L02-17.)
- Broadcast / when I receive
- A named message fired by broadcast [name v] on one script, heard by every when I receive [name v] hat anywhere in the project. How sprites talk. (L02-20 to L02-24.)
- Variable (set vs change)
- A named storage slot for a number or text. set [name v] to (0) replaces; change [name v] by (1) adds. Reset with set at game-start, count with change during play. (L02-31 to L02-36.)
- Clone
- A live copy of a sprite, created by create clone of [myself v] and given its own script by the when I start as a clone hat. Each clone runs independently. End each clone with delete this clone. (L02-37 to L02-43.)
Homework 2 min
The L2-Cluster Audit. One small project per cluster you feel rusty on. You pick which two — minimum two, maximum four.
- Open a fresh Scratch project. Pick one of the eight L2 clusters you feel weakest on. Build the smallest possible script that uses the cluster's signature block. (Examples: cluster B → a sprite that says "Hot!" only when the mouse is touching it. Cluster F → a sprite that counts up by 1 every second using a variable on-stage.)
- Save as
HW-L3-01-Cluster-X.sb3where X is the cluster letter. - Repeat for at least one more cluster — pick a different one.
- Write one sentence per project: "This is the smallest example of cluster X because it uses the signature block …."
Bring back next class:
- At least two
.sb3files and your one-sentence notes. - Your answer to: "Which cluster did you skip building? Why does it feel solid enough to skip?" Your answer tells me where L3 can push and where to slow down.
Heads up for next class: SCR-L03-02 opens the green Operators palette properly for the first time. We'll go deep on the four arithmetic blocks — () + (), () - (), () * (), () / () — and use them to build the Lucky Number Machine's maths engine.