Learning Goals 3 min
By the end of this lesson you will be able to:
- Build a 2-scene Hari Raya story from a blank Scratch project:
kitchen day→kitchen night. - Use switch backdrop + wait + switch costume in one stack to take the cat from awake to sleepy.
- Click the green flag and watch your finished story play in under 10 seconds.
Warm-Up 7 min
Over four lessons you have collected every piece — backdrops, costume swaps, waits, and scene reactions. Today you assemble the full kampung day-to-night story and ship it.
Quick-fire puzzle
Faridah built this 4-block stack and clicked the flag. The Stage starts on kitchen day. What does the cat look like at the very end?
when flag clicked
switch costume to [costume1 v]
wait (2) seconds
switch costume to [costume2 v]
Reveal the answer
The cat is wearing costume2 at the end. Step 1 sets the cat to costume1. Step 2 pauses. Step 3 swaps to costume2. The whole thing takes 2 seconds. We'll combine this idea with backdrops today.
Project Brief — a Hari Raya kitchen at day and at night 15 min
Today's project: a tiny Hari Raya story. Aisyah's family kitchen is busy in the day with kuih on the table. Then night falls and everyone goes to sleep — including the cat. Two backdrops, one sprite, two costumes, one stack of about 7 blocks.
What you'll build
- 1 sprite — the cat.
- 2 costumes —
costume1(awake) andcostume2(sleepy). Use the default cat's costumes, or paint your own. - 2 backdrops —
kitchen day(a bright kitchen) andkitchen night(the same kitchen, dimmer). - 1 script — a 7-block stack on the cat that drives the whole story.
The blocks you'll need (all already taught)
| Block | Category | Role in this project |
|---|---|---|
| when flag clicked | Events | Starts the story. |
| switch backdrop to [kitchen day v] | Looks | Opens on the day scene. |
| switch costume to [costume1 v] | Looks | Cat starts awake. |
| say [Selamat Hari Raya!] for (2) seconds | Looks | Cat greets the audience. |
| wait (2) seconds | Control | A pause so the change feels real. |
| switch backdrop to [kitchen night v] | Looks | Night falls. |
| switch costume to [costume2 v] | Looks | Cat gets sleepy. |
Why this project
Hari Raya is one of Malaysia's biggest moments — bright kitchens, family, kuih on every table. A 2-scene "day to night" piece is a familiar shape for a beginner story: open the scene, greet, pause, change, close. Once you can build this, you can build any festival story (CNY, Deepavali, Christmas).
Guided Build — step by step 15 min
Start a fresh Scratch project. The default cat is your sprite.
Step 1 — Prepare two costumes
Click the cat. Click the Costumes tab. You should see costume1 and costume2. Click costume2 and use the paint editor to make the eyes a thin line or close them — that's your "sleepy" look. (Optional: skip this and leave costume2 as is.)
Step 2 — Prepare two backdrops
Click the Stage card. Click the Backdrops tab. Add a backdrop from the library — "Room 1" works well. Rename it kitchen day. Right-click the backdrop in the list, Duplicate it. Rename the copy kitchen night. With the night copy selected, use the Paint editor to drop a dark blue rectangle over the whole scene (set the rectangle to ~50% opacity), or repaint the upper half deep blue.
Step 3 — Select the cat, Code tab
Click the cat in the Sprite list. Click the Code tab. Clear any old practice scripts.
Step 4 — Lay down the seven blocks
Build this stack in order, top to bottom. Take your time. Use the dropdowns to pick the right backdrop and costume names.
- From Events: when flag clicked.
- From Looks: switch backdrop to [kitchen day v].
- From Looks: switch costume to [costume1 v].
- From Looks: say [Selamat Hari Raya!] for (2) seconds.
- From Control: wait (2) seconds.
- From Looks: switch backdrop to [kitchen night v].
- From Looks: switch costume to [costume2 v].
Step 5 — Test
Click the green flag. The story should play in this order:
- 0.0 s — Stage flips to
kitchen day, cat wearscostume1. - 0.0 s → 2.0 s — Cat says "Selamat Hari Raya!".
- 2.0 s → 4.0 s — A quiet pause (2-second wait).
- 4.0 s — Stage flips to
kitchen night, cat changes tocostume2.
What changed: compared to the four backdrop lessons before, this is your first complete finished story — a thing you'd be happy to show your family. It is short, it has a beginning and an end, and the Stage really does feel like time passing.
The full assembled stack (your reference)
when flag clicked
switch backdrop to [kitchen day v]
switch costume to [costume1 v]
say [Selamat Hari Raya!] for (2) seconds
wait (2) seconds
switch backdrop to [kitchen night v]
switch costume to [costume2 v]
Extend the Project — three small variations 12 min
Goal: Add a goodnight line. After the night switch, make the cat say "Selamat tidur!" for 2 seconds. Your stack grows to 8 blocks — exactly at the L1 cap.
when flag clicked
switch backdrop to [kitchen day v]
switch costume to [costume1 v]
say [Selamat Hari Raya!] for (2) seconds
wait (2) seconds
switch backdrop to [kitchen night v]
switch costume to [costume2 v]
say [Selamat tidur!] for (2) seconds
Think: The story now ends with a proper farewell. Many real stories work the same way — opening greeting, middle, closing line.
Goal: Move the cat to a "bed" position at night. Use go to x: (-150) y: (-100) right before the costume change. This way the cat literally goes to bed at sundown. (You'll need to drop the goodnight line from the easy variation to stay under 8 blocks — or replace the say with a quieter think bubble.)
when flag clicked
switch backdrop to [kitchen day v]
switch costume to [costume1 v]
say [Selamat Hari Raya!] for (2) seconds
wait (2) seconds
switch backdrop to [kitchen night v]
go to x: (-150) y: (-100)
switch costume to [costume2 v]
Think: Backdrops change where the audience thinks they are. Sprite position changes where the action is on screen. Both at once feels twice as polished.
Goal: Split the project into a driver script + reaction scripts (the L01-33 pattern). Move all the "after the switch" behaviour out of the main stack and into hat blocks that listen for each backdrop. The driver script becomes just 4 blocks; each reaction is 2 blocks. Cleaner and easier to extend.
when flag clicked
switch backdrop to [kitchen day v]
wait (4) seconds
switch backdrop to [kitchen night v]
when backdrop switches to [kitchen day v]
switch costume to [costume1 v]
say [Selamat Hari Raya!] for (2) seconds
when backdrop switches to [kitchen night v]
switch costume to [costume2 v]
say [Selamat tidur!] for (2) seconds
Think: Three short scripts beat one long one. To add a third scene later (sahur breakfast?), you'd add one new backdrop and one new reaction — without editing the driver.
Mini-Challenge — add a second sprite 5 min
"A second character at the table"
Add one more sprite to your project (e.g. an Owl, a child, or a plate of kuih). Give it its own reaction to the night backdrop using when backdrop switches to [kitchen night v]. The cat and the new sprite should both react when night arrives.
It works if:
- The new sprite is visible in Scene A (day).
- When the backdrop switches to
kitchen night, the new sprite does something — hides, says "Goodnight!", shrinks, or moves to the side. - The cat's scripts from the Worked Example still work unchanged.
Reveal one valid solution — an owl that appears at night
Add a sprite called "Owl". On the Owl, add two scripts:
when flag clicked
hide
when backdrop switches to [kitchen night v]
show
say [Hoot!] for (2) seconds
The owl is hidden during the day, then appears the moment night arrives. The cat's existing script keeps working — both sprites now share the Stage's clock.
Recap 2 min
You just built your first complete Scratch story. Two backdrops named after times of day, one sprite with two costumes, one short stack of seven blocks. The recipe — backdrop, costume, say, wait, backdrop, costume — is the heart of every multi-scene project you'll ever build. Bigger stories will add sprites and broadcasts; the bones stay the same.
- Scene
- One moment of a story, with its own backdrop and sprite costumes.
- Duplicate (Backdrops list)
- The right-click option that copies a backdrop. Handy when "scene B" is "scene A but darker".
- Project
- A finished Scratch piece — short, watchable, with a clear start and end. Today's day-to-night story is your first one.
Homework 1 min
Pick your own festival. Build a 2-scene story for a different Malaysian festival — Chinese New Year, Deepavali, or Christmas — using today's recipe.
- Add 2 backdrops. Name them after the moment they show (e.g.
cny lunchandcny firecrackers). - Keep your sprite simple — the default cat is fine, or pick something festival-appropriate from the library.
- Write one script on the sprite. Use when flag clicked, two switch backdrop blocks, two say lines, and one wait.
- Keep the script at 8 blocks or fewer.
Bring back next class:
- A screenshot of your finished script.
- A screenshot of each backdrop (two pictures).
- Your written answer: "Which order works best — say-then-wait or wait-then-say? Why?"
Heads up for next class: SCR-L01-35 opens cluster F — Sound. You'll meet play sound [Meow v] until done, and the cat finally gets a voice.