- Learnt28 min · scenes, backdrop cues, named messages, broadcast and wait
- Basic24 min · build the three-scene story
- Challenge 1–327 min · a fourth scene, a chat, a sound for each scene
- Extrabonus · walk on before you speak
Review — Line Follower 5 min
The last four lessons built a robot that feels the floor.
touching color [#000000]?asks if any part of the sprite touches that colour.color [#ff0000] is touching [#000000]?asks about one colour on the sprite. That is how two sensor dots can steer.- Speed and turn were variables. You tuned them to make the robot smooth.
Quick-fire
The robot has a red dot on its left side. The line is black. Which block tells you the left side is on the line?
Reveal the answer
color [#ff0000] is touching [#000000]? — the red dot is on the black. touching color [#000000]? would be true if any part of the robot touched the line.
Today’s Topic 3 min
- A story is a row of scenes
when backdrop switches to [Forest v]— the backdrop is a cue- Messages with names that say what they start
broadcast [forest scene v] and wait— and why the waiting matters
Learning outcome
By the end of this lesson you will be able to:
- Split a story into scenes, with one message for each scene.
- Put each character in its place when the backdrop changes.
- Make every scene finish before the next scene starts.
Learnt — a story in scenes 28 min
Plan the story first
A story is a row of scenes. Each scene has a place and a speaker.
| Scene | Backdrop | Who talks | What they say |
|---|---|---|---|
| 1 | Forest | Wizard | This is Gobo. Gobo lives in the forest. / Today Gobo is going to the castle. |
| 2 | Castle 2 | Gobo | There it is! The castle! / I hope somebody is home. |
| 3 | Castle 3 | Dragon | Hello, Gobo! Welcome to my castle. / Come in and play! |
Three sprites from the library: Wizard, Gobo and Dragon. Three backdrops: Forest, Castle 2 and Castle 3.
The backdrop is a cue
Gobo stands in a different place in each scene. You could move him in every script. There is a neater way.
- Click Gobo in the Sprite list.
- Open Events.
- Drag out
when backdrop switches to [Forest v]. - Add
go to x: (10) y: (-60)under it. - Do the same for Castle 2 and Castle 3, with their own numbers.
when backdrop switches to [Forest v]
go to x: (10) y: (-60)
when backdrop switches to [Castle 2 v]
go to x: (60) y: (-120)
when backdrop switches to [Castle 3 v]
go to x: (-60) y: (-100)
The Dragon only belongs in the hall:
when backdrop switches to [Forest v]
hide
when backdrop switches to [Castle 3 v]
show
Test the cues with no story at all. This Stage script flips the backdrops every two seconds:
when flag clicked
forever
switch backdrop to [Forest v]
wait (2) seconds
switch backdrop to [Castle 2 v]
wait (2) seconds
switch backdrop to [Castle 3 v]
wait (2) seconds
end
How to use this: Click the green flag to start it. Nothing else to press — watch Gobo jump to his spot at each new backdrop, then press ■ Stop.
A message for each scene
Each scene is started by a message. Give it a name that says what it starts: forest scene, castle scene, hall scene. A name like message2 tells you nothing a week later.
when I receive [forest scene v]
say [This is Gobo. Gobo lives in the forest.] for (2.5) seconds
say [Today Gobo is going to the castle.] for (2.5) seconds
when I receive [castle scene v]
say [There it is! The castle!] for (2) seconds
say [I hope somebody is home.] for (2) seconds
when I receive [hall scene v]
say [Hello, Gobo! Welcome to my castle.] for (2.5) seconds
say [Come in and play!] for (2) seconds
The problem: everybody talks at once
Now the Wizard runs the story. Here is a first try:
when flag clicked
switch backdrop to [Forest v]
broadcast [forest scene v]
switch backdrop to [Castle 2 v]
broadcast [castle scene v]
switch backdrop to [Castle 3 v]
broadcast [hall scene v]
say [The end!] for (2) seconds
broadcast [forest scene v] sends the message and goes straight on. It does not wait for the scene. So the whole script runs in one blink.
How to use this: Click the green flag to start it. Nothing else to press — watch it through, then use ↺ Reset to run it again.
The fix: broadcast and wait
Events has a second broadcast block. It waits.
| Block | What it does | Use it when |
|---|---|---|
broadcast [forest scene v] | Sends the message. Goes on at once. | Something should start, and you do not need to wait for it. |
broadcast [forest scene v] and wait | Sends the message. Waits until every script it started has finished. | The next thing must not start until this one is done. |
when flag clicked
switch backdrop to [Forest v]
broadcast [forest scene v] and wait
switch backdrop to [Castle 2 v]
broadcast [castle scene v] and wait
switch backdrop to [Castle 3 v]
broadcast [hall scene v] and wait
say [The end!] for (2) seconds
How to use this: Click the green flag to start it. Nothing else to press — watch all three scenes, then use ↺ Reset to run it again.
Like a relay race
Plain broadcast is a starting pistol. Everybody runs at the same moment. Broadcast and wait is a relay race. The next runner waits for the baton.
Basic — build the three-scene story 24 min
Step 1 — the cast and the places
- Start a new project. Delete the cat.
- Add three sprites from the library: Wizard, Gobo and Dragon.
- Add three backdrops: Forest, Castle 2 and Castle 3.
- Make the Wizard small: size 45. Drag him to the far left.
- Make the Dragon size 60. Set its direction to −90 and its rotation style to left / right, so it faces Gobo.
Step 2 — the cues
Give Gobo his three when backdrop switches to [Forest v] stacks. Give the Dragon its two. Test them with the forever script on the Stage. Then delete that script.
Step 3 — three messages
Drag out any broadcast [forest scene v] block. Open its dropdown and choose New message. Make forest scene, castle scene and hall scene.
Step 4 — the lines
Build the three when I receive [forest scene v] stacks from Learnt. One on the Wizard, one on Gobo, one on the Dragon.
Step 5 — the storyteller, the wrong way
On the Wizard, build the storyteller with plain broadcast [forest scene v] blocks. Click the flag. Watch everybody talk at once. Do not fix it yet. Look at what goes wrong.
Step 6 — the storyteller, the right way
Swap each broadcast for broadcast [forest scene v] and wait. Pick the same message in each dropdown. Click the flag again.
Check your Wizard against this:
when flag clicked
switch backdrop to [Forest v]
broadcast [forest scene v] and wait
switch backdrop to [Castle 2 v]
broadcast [castle scene v] and wait
switch backdrop to [Castle 3 v]
broadcast [hall scene v] and wait
say [The end!] for (2) seconds
when I receive [forest scene v]
say [This is Gobo. Gobo lives in the forest.] for (2.5) seconds
say [Today Gobo is going to the castle.] for (2.5) seconds
The Dragon is in the forest.
Its when backdrop switches to [Forest v] is missing, or it says show instead of hide. Check the dropdown too — it must say Forest.
The story stops after scene 1.
Look at the dropdowns. The Wizard broadcasts castle scene, but Gobo may listen for a different name. castle scene and castle are two different messages.
A scene is skipped in a blink.
That one broadcast is still the plain kind. The and-wait block is longer and ends with the word wait.
Gobo stays in the same place.
The cues are on the wrong sprite. Click Gobo in the Sprite list and look. They must be in his Code tab.
A fourth scene
- After the hall, Gobo goes home to bed.
- Use the Bedroom 1 backdrop.
- Gobo says two lines there. The Dragon is not in the bedroom.
- “The end!” still comes last.
How to use this: Click the green flag to start it. Nothing else to press — watch all four scenes, then use ↺ Reset to run it again.
Teacher reveal
Two more blocks for the Wizard, before “The end!”:
switch backdrop to [Bedroom 1 v]
broadcast [bedroom scene v] and wait
Plus a bedroom scene stack on Gobo, a Bedroom 1 cue for Gobo, and hide on the Dragon’s Bedroom 1 cue. Pupils who forget that last one see the Dragon tuck itself into bed.
A chat inside one scene
In the hall, the Dragon and Gobo take turns:
| # | Who | Line |
|---|---|---|
| 1 | Dragon | Hello, Gobo! |
| 2 | Gobo | Hello, Dragon! |
| 3 | Dragon | Do you want to play? |
| 4 | Gobo | Yes, please! |
No wait blocks. The Wizard must not say “The end!” until Gobo has said “Yes, please!”.
How to use this: Click the green flag to start it. Nothing else to press — watch it through, then use ↺ Reset to run it again.
Teacher reveal — the chain has to wait too
when I receive [hall scene v]
say [Hello, Gobo!] for (2) seconds
broadcast [gobo hello v] and wait
say [Do you want to play?] for (2) seconds
broadcast [gobo yes v] and wait
On the Dragon. Gobo has two small stacks, one for each message. The trap: if the Dragon uses plain broadcast [gobo yes v] at the end, its script finishes before Gobo speaks. The Wizard only waits for scripts the hall scene message started — so “The end!” lands on top of “Yes, please!”.
A sound for every scene
- The forest plays Bird. Castle 2 plays Medieval1. The hall plays Medieval2.
- A new scene stops the old sound before it starts its own.
- Everything is quiet after “The end!”.
How to use this: Turn your sound on. Click the green flag to start it. Nothing else to press — listen as each scene begins.
Teacher reveal — put it on the Stage
when backdrop switches to [Forest v]
stop all sounds
start sound [Bird v]
when backdrop switches to [Castle 2 v]
stop all sounds
start sound [Medieval1 v]
when backdrop switches to [Castle 3 v]
stop all sounds
start sound [Medieval2 v]
Three cues on the Stage, which owns the sounds. The Wizard adds stop all sounds after “The end!”. A pupil who puts the music in the scene messages instead makes the storyteller wait for the song to end.
Walk on before you speak
- At the start of every scene, Gobo is at the left edge.
- He walks to the middle.
- Nobody says a word until he gets there.
How to use this: Click the green flag to start it. Nothing else to press — watch Gobo walk on three times.
Summary 3 min
- A story is a row of scenes. Plan them in a table first.
when backdrop switches to [Forest v]is a cue. Use it to put each character in place.- Name each message after what it starts.
broadcast [forest scene v]starts a scene and goes on at once.broadcast [forest scene v] and waitwaits until the scene is over. That is what stops the talking over.
- Scene
- One part of a story: one place, one bit of talking.
- Cue
- A signal that tells a sprite what to do now.
- Broadcast and wait
- Send a message, then wait until everybody who heard it has finished.
- Storyteller script
- The one script that runs the story in order.
Hand in
Save your story and send it to your teacher. Next lesson, the reader gets to choose where Gobo goes.