Skip to main content

🎭 Lesson 3.1: An Interactive Animated Story

Time to build something your child will want to show off: a little animated scene with two characters who talk to each other, on a real backdrop. You'll meet the magic block that lets sprites work as a team β€” the broadcast.

🎯 Learning Objectives

  • Add multiple sprites and a backdrop from the libraries
  • Position sprites with go to and glide
  • Coordinate sprites with broadcast and when I receive
  • Stage a two-character conversation that plays itself

Estimated Time: 45 minutes  β€’  Builds on: Module 2

Ages 5–7 (with help) Ages 8–11 Ages 12+
In This Lesson

πŸ› οΈ Try It: Set the scene

Every story needs a place and a cast. Start a new project, then:

  1. Add a backdrop. Click the Choose a Backdrop button (bottom-right, below the stage panel) and pick a setting β€” say, "Forest."
  2. Add a second sprite. Click the Choose a Sprite cat button and pick a character to join the cat.
The Choose a Sprite library, a grid of characters with category filters like Animals, People, Fantasy, Dance, and a search box.
The sprite library β€” hundreds of ready characters.
The Choose a Backdrop library, a grid of background scenes with category filters.
The backdrop library β€” pick your setting.

πŸ’‘ Remember from Lesson 1.2

Each sprite has its own code. Click a sprite in the sprite list before you add blocks, so the blocks land on the right character.

πŸŽ“ Learn It: Positioning & glide

The stage is a grid: x is left–right (βˆ’240 to 240), y is down–up (βˆ’180 to 180), and the center is x: 0, y: 0. Two Motion blocks place your cast:

  • go to x: __ y: __ β€” teleports instantly (use it to set a starting spot).
  • glide 1 secs to x: __ y: __ β€” slides smoothly over time (lovely for entrances).
when βš‘ clicked
go to x: -200 y: -100
glide 2 secs to x: 0 y: -100
say Hello, forest! for 2 seconds

Give the cat this script: it starts off-stage-left and glides to center as the story opens. Cinematic!

πŸŽ“ Learn It: Broadcasts β€” the team signal

Here's the problem: how does Sprite B know when Sprite A finished talking, so it can reply? Sprites can't see each other's scripts. The answer is a broadcast β€” a silent, invisible signal any sprite can shout, and any sprite can listen for.

It's like a stage director calling "Cue: cat's done!" Every actor listening for that cue springs into action.

sequenceDiagram participant Cat participant Director as Broadcast participant Bear Cat->>Director: broadcast "your turn" Director-->>Bear: when I receive "your turn" Bear->>Bear: say a reply

Cat: send the cue

when βš‘ clicked
say Hi Bear! for 2 seconds
broadcast your turn

Bear: listen for the cue

when I receive your turn
say Hi Cat! Nice day! for 2 seconds

Both blocks live in the gold Events category. The first time, you'll pick "New message" and name your cue (like your turn). Naming cues clearly is a great habit.

πŸ› οΈ Try It: A conversation that plays itself

Chain broadcasts to script a whole back-and-forth. Each sprite talks, then cues the next line:

  1. Cat (on green flag): say "Hi Bear!", then broadcast line 2.
  2. Bear (when I receive line 2): say "Hello Cat!", then broadcast line 3.
  3. Cat (when I receive line 3): say "Want to explore?", then broadcast line 4.
  4. Bear (when I receive line 4): say "Let's go!" and glide off together.

βœ… Why broadcasts beat guessing wait times

You could try to line up two sprites with matching "wait" blocks β€” but the timing drifts and breaks. Broadcasts guarantee the next line only starts when the last one truly finishes. Cleaner, and it always works.

πŸ’‘ Challenge: change the backdrop mid-story

The Stage can receive broadcasts too. Give the Stage a script: when I receive "night" β†’ switch backdrop to a night scene. Then have a sprite broadcast "night" at the story's turning point. Instant scene change!

πŸ’¬ Teach It: Story before code

The secret to a great story project: plan the story with paper and voices first, code second. Coding a story your child hasn't imagined yet is backwards.

The 3-step story warm-up

  1. Who? Let them pick two characters and give them names and personalities.
  2. Where? Pick the setting (backdrop) together.
  3. What happens? Act out the conversation out loud, taking turns voicing each character. That is the script you'll code.

"Let's be the characters first! You be the bear, I'll be the cat. What does the cat say? …Great β€” now let's make Scratch say exactly that."

πŸ‘§ Ages 5–7

Two lines each is plenty. You wire the broadcasts; they choose the words and characters. The magic is hearing their words come out of the sprite.

πŸ§’ Ages 8–11

They can manage the broadcast chain with light help. Encourage a beginning, a problem, and an ending.

πŸ§‘ Ages 12+

Push for a scene change (backdrop broadcast), sound effects, and a third character. Suddenly it's a real production.

⚠️ Common kid bug

Both sprites start talking at once (they both used when 🟩 clicked). Fix: only the first line starts on the flag; every other line starts with when I receive.

🎯 Quick Check

Question 1: Two sprites need to take turns talking. What coordinates them?

Question 2: Which block moves a sprite smoothly over time?

Question 3: Both characters talk at the exact same time. Likely cause?

Summary & What's Next

πŸŽ‰ Key Takeaways

  • Add sprites and backdrops from the libraries; each sprite has its own code.
  • go to teleports; glide slides smoothly.
  • broadcast + when I receive let sprites cue each other reliably.
  • Plan the story out loud before coding it.

πŸš€ Next up

Stories are wonderful, but kids often dream of games. In Lesson 3.2 we build one β€” with a variable to keep score. Get ready to catch some falling apples.