Learning Goals 3 min
By the end of this lesson you will be able to:
- Plan a three-scene story on paper before opening Scratch — one sentence per scene, naming the backdrop and which sprites appear.
- Use broadcast (scene2 v) from one script to swap the backdrop and hand control to whichever sprites should be on stage next.
- Combine when I receive hats with show / hide so each sprite only appears during the scenes that need it — a clean scene chain.
Warm-Up — Aisyah's bedroom-school-bedroom problem 7 min
Aisyah wants to tell a tiny story: she wakes up at home in KL, takes the LRT to school, learns something, then comes home for teh tarik with her mum. Three places, one Aisyah sprite, one mum sprite, one teacher sprite. She tries to do it all in one script:
when flag clicked
switch backdrop to [bedroom v]
say [Good morning!] for (2) seconds
switch backdrop to [school v]
say [Time for class!] for (2) seconds
switch backdrop to [bedroom v]
say [Teh tarik time!] for (2) seconds
Click the flag in your head. What goes wrong as soon as the mum and teacher sprites need to join in?
Reveal the problem
Only Aisyah is doing anything. Mum is silent during scene 3. Teacher is silent during scene 2. And worst of all — the mum sprite is visible at school, and the teacher is visible in the bedroom, because nothing told them to hide. One script on one sprite can change the backdrop, but it can't tell the other sprites what to do.
The fix is what we've been building toward for the whole broadcast cluster: the script that swaps the backdrop should also send a cue. Every sprite that belongs in the next scene listens for that cue and shows itself. Every sprite that doesn't belong hides. Today we put that pattern together end-to-end and build a real three-scene story.
New Concept — scenes are messages 15 min
Up to now you've used broadcasts for single events: a button is clicked, a door opens, a race starts. Today you'll use them as scene markers. Each scene gets one broadcast name, and the rule is simple: nothing happens on stage without a scene cue first.
Plan first, click later
This is a Project lesson, which means we plan before we drag. Get a piece of paper. Draw three boxes side by side. In each box write:
- The backdrop name (the picture behind everything).
- Which sprites are visible.
- One sentence of what happens.
For Aisyah's story it might look like this:
- Scene 1 — bedroom. Sprites: Aisyah, Mum. Aisyah says "Good morning!" Mum says "Eat your roti, ya."
- Scene 2 — school. Sprites: Aisyah, Teacher. Teacher says "Today we learn Scratch!" Aisyah says "Wah, best!"
- Scene 3 — bedroom. Sprites: Aisyah, Mum. Mum says "Teh tarik?" Aisyah says "Yes please."
Now you know exactly what to build. Three backdrops, three scene cues, three sprites with show/hide rules. Nothing surprising should happen at the keyboard.
One cue per scene
Pick clear names. scene1, scene2, scene3 is fine. morning, school, teh tarik is even better because future-you will read the broadcast dropdown and instantly know which scene is which.
when flag clicked
broadcast (scene1 v)
The Stage is a listener too
The Stage isn't a sprite, but it has its own scripting area — and it can run when I receive hats just like sprites do. That's how the backdrop swaps:
when I receive (scene2 v)
switch backdrop to [school v]
Every sprite reacts to every scene
This is the part that trips people up. Each sprite needs an answer for every scene, not just "its" scene. The Teacher sprite, for example, must say "show myself" when scene2 arrives, but also "hide myself" when scene1 or scene3 arrives — otherwise the teacher floats around the bedroom.
when I receive (scene1 v)
hide
when I receive (scene2 v)
show
say [Today we learn Scratch!] for (2) seconds
when I receive (scene3 v)
hide
Worked Example — Aisyah's morning 12 min
We're going to build Aisyah's three-scene story together. Eight steps.
Step 1 — Add the three backdrops
New project. Click the Stage thumbnail (bottom-right). Choose a Backdrop. Pick Bedroom 1, then add School1, then a second copy of Bedroom 1. (Or paint your own — kids love drawing their own bedroom.)
Step 2 — Create the three message names
On any sprite, drop one broadcast (message1 v). Click the ▾, pick New message…, type scene1. Repeat for scene2 and scene3. Now all three names exist in the project's message list.
Step 3 — Add the three sprites
Delete the cat. Add three sprites from the library or paint them: Aisyah, Mum, Teacher. Position Aisyah on the left, Mum on the right, Teacher somewhere — we'll only see her in scene 2 anyway.
Step 4 — The starter script (any sprite, or the Stage)
One tiny "kickoff" script. Put it on the Stage so it's easy to find later:
when flag clicked
broadcast (scene1 v)
Step 5 — Teach the Stage to swap backdrops
Still on the Stage, add three more tiny scripts — one per scene:
when I receive (scene1 v)
switch backdrop to [bedroom1 v]
when I receive (scene2 v)
switch backdrop to [school1 v]
when I receive (scene3 v)
switch backdrop to [bedroom1 v]
Step 6 — Wire up Aisyah (she's in every scene)
Click the Aisyah sprite. She appears in all three scenes, so she shows in all three. She also moves the story forward by sending the next cue after her last line.
when I receive (scene1 v)
show
say [Good morning!] for (2) seconds
broadcast (scene2 v)
when I receive (scene2 v)
show
say [Wah, best!] for (2) seconds
broadcast (scene3 v)
when I receive (scene3 v)
show
say [Yes please.] for (2) seconds
Step 7 — Wire up Mum
Mum is in scenes 1 and 3. Hide in scene 2.
when I receive (scene1 v)
show
say [Eat your roti, ya.] for (2) seconds
when I receive (scene2 v)
hide
when I receive (scene3 v)
show
say [Teh tarik?] for (2) seconds
Step 8 — Wire up Teacher
Teacher is only in scene 2.
when I receive (scene1 v)
hide
when I receive (scene2 v)
show
say [Today we learn Scratch!] for (2) seconds
when I receive (scene3 v)
hide
The full assembled story
Click the flag. The bedroom appears, Mum says her line, Aisyah says hers, Aisyah sends scene2, the backdrop swaps to school, Mum hides, Teacher appears, Teacher speaks, Aisyah replies, Aisyah sends scene3, the backdrop swaps back to bedroom, Teacher hides, Mum reappears, and the story closes on teh tarik. Three scenes, three sprites, fully chained.
What you just built: the entire skeleton of every cutscene, every cartoon, every dialogue tree in every Scratch game on the front page. A backdrop, some listeners, a cue that hands off to the next scene. Everything else is just more of this.
Try It Yourself — three story drills 15 min
Goal: Build a two-scene story: scene 1 is a beach, scene 2 is underwater. One sprite (a fish, or a crab from the library). Scene 1 the fish says "Hot today!" and broadcasts scene 2. Scene 2 the fish says "Ahhh, much better!"
when flag clicked
broadcast (scene1 v)
when I receive (scene1 v)
switch backdrop to [beach v]
show
say [Hot today!] for (2) seconds
broadcast (scene2 v)
when I receive (scene2 v)
switch backdrop to [underwater1 v]
say [Ahhh, much better!] for (2) seconds
Think: Why does the broadcast (scene2 v) sit at the end of the scene1 hat and not at the top? Because the sprite hasn't said its line yet — fire the next cue only after this scene is done.
Goal: Build Daniel's three-scene canteen story. Scene 1: empty canteen (backdrop only, no sprites visible, just a 2-second pause). Scene 2: Daniel walks in (show + say "Lapar!"). Scene 3: the canteen auntie appears (show auntie, hide Daniel, say "Nasi lemak ada!"). Use the Stage for the backdrop swaps.
when I receive (scene1 v)
hide
wait (2) seconds
broadcast (scene2 v)
when I receive (scene2 v)
show
say [Lapar!] for (2) seconds
broadcast (scene3 v)
when I receive (scene3 v)
hide
Think: The auntie's script is almost a mirror image — hide in scene 1 and 2, show in scene 3. Which sprite is responsible for sending each cue? Whichever one was the last to talk in that scene.
Goal: Add a fourth scene to Aisyah's story — a flashback scene 2.5 inside the school where Aisyah remembers her mum's roti. New backdrop (anything cosy), new broadcast flashback, fires between scene 2 and scene 3. During the flashback, hide the Teacher, show Aisyah with a different line ("Mmm, that roti…"), then broadcast scene3.
when I receive (flashback v)
show
say [Mmm, that roti...] for (2) seconds
broadcast (scene3 v)
Think: You just learned the secret of every Pixar film. Scenes are independent — adding a new one is "create the backdrop, name the cue, add hats on every sprite, wire the previous scene to send the new cue". No old code breaks.
Mini-Challenge — Priya's ghost teacher 5 min
"Why is the teacher still in the bedroom?"
Priya copies the worked example, runs it, and the story plays — but during the scene-3 bedroom moment, the Teacher sprite is still standing in the middle of the room, silent and a bit creepy. Her Teacher sprite has this script:
when I receive (scene2 v)
show
say [Today we learn Scratch!] for (2) seconds
Walk through the scenes in your head. Why is the teacher visible in scene 3?
Reveal one valid fix
The Teacher gets shown in scene 2 — that flips her "visible" switch on. Nothing in scene 3 flips it back off. Scratch never auto-hides sprites between scenes; it just does what you told it to do, which in this case was "show, and never hide". The teacher stays on screen with no lines.
The fix is to add a hide rule for every scene the teacher doesn't appear in:
when I receive (scene1 v)
hide
when I receive (scene2 v)
show
say [Today we learn Scratch!] for (2) seconds
when I receive (scene3 v)
hide
Every sprite needs an answer for every scene. Either "show and act" or "hide and wait". The empty silence between scenes is where ghosts grow. A scene chain is only as clean as its hide blocks.
Recap 3 min
You built a real multi-scene story by treating each scene as a broadcast cue. One short kickoff script fires scene1. The Stage swaps backdrops on each when I receive. Each sprite has one tiny hat per scene — show and act if it belongs there, hide if it doesn't. The last sprite in a scene fires the next scene's cue. That's the whole pattern, and you can extend it from three scenes to thirty without rewriting a single line of old code.
- Scene
- A coherent moment in the story — one backdrop, one set of visible sprites, one chunk of dialogue. In Scratch, a scene is identified by a broadcast name.
- Scene cue
- A broadcast whose name describes a scene (
scene1,morning,flashback). Receivers use it to know which scene is current. - Scene chain
- The pattern where each scene ends by broadcasting the next scene. Lets a story play forward automatically without a master timer.
- Show / hide pair
- The discipline of giving every sprite a rule for every scene — show in the scenes it belongs to, hide in the rest. Stops ghost sprites.
- Stage script
- A script that lives on the Stage (not on a sprite). Backdrop swaps belong here so the project is easy to read.
Homework 2 min
The Saturday-In-KL Project. Build a 3-to-4 scene story about your own Saturday. Pick three places you actually go — your bedroom, a mamak, the LRT, a friend's house, the park, Mid Valley, anywhere. One sprite is you. At least one other sprite (family, friend, satay seller, anyone) joins in at least one scene.
- Plan on paper first. Three boxes, one sentence per scene, list of sprites visible. Don't open Scratch until the plan is done.
- Add the three backdrops to the Stage.
- Create three (or four) scene messages:
scene1,scene2,scene3. - Build the kickoff: when ⚑ clicked + broadcast (scene1 v).
- Put the backdrop switch backdrop to hats on the Stage, one per scene.
- For each sprite, add one when I receive hat per scene — show + act, or hide.
- End each scene's "main" sprite with a broadcast for the next scene.
Save as HW-L2-25-My-Saturday.sb3.
Bring back next class:
- The
.sb3file. - Your paper plan (a phone photo is fine).
- Your answer to: "Which sprite fires the cue for your final scene, and why that one?"
Heads up for next class: SCR-L02-26 opens Cluster E by looking at one sprite very closely — its costumes. You'll wrap next costume in a forever loop and watch your sprite flicker to life. Animation is just costume changes on a timer.