Year 7Technology 50 min
We are learning to
- We are learning to use events and broadcast messages to control when scripts run.
- We are learning to set a starting state so a program runs the same way every time.
Success criteria: I can…
- I can explain why wait blocks make a conversation fall out of time.
- I can use broadcast and when I receive blocks so characters take turns.
- I can change the backdrop between scenes using a broadcast.
- I can write a start-up script that resets positions, costumes and the backdrop when the green flag is clicked.
Key competenciesThinkingUsing language, symbols and textsManaging self
Lesson sequence
50 min total- 1
The conversation that goes wrong
Starter 0–8 minTeacher- Before the lesson, build the starter project described in the resources and open it on the projector.
- Say: “"Two friends are getting ready for school camp. Watch their conversation." Click the green flag.”
- Ask: How did I make Sam wait for Alex to finish? (A wait 2 seconds block before Sam speaks.)
- Say: “"Now Alex has a longer line." Change Alex's first say block to 4 seconds and add more words. Click the green flag.”
- Ask: What went wrong? (Sam starts talking while Alex is still speaking, because Sam still waits only 2 seconds.)
- Ask: If I change one line, how many other blocks do I have to fix? (Every wait after it, in both sprites.)
- Say: “Today we fix this properly, so a character speaks when the other finishes, not after a guessed number of seconds.”
Students- Watch the conversation and spot where it goes wrong.
- Explain to a partner why the wait blocks failed.
Starter project, built before the lesson. Sprite Alexwhen green flag clicked, say "Are you packed for camp?" for 2 seconds, wait 2 seconds, say "Don't forget your torch!" for 2 seconds. Sprite Sam: when green flag clicked, wait 2 seconds, say "Nearly! Just my sleeping bag to go." for 2 seconds.
- 2
Model: broadcast and when I receive
Main 8–20 minTeacher- Remove all wait blocks from both sprites.
- Say: “In the Events section there is a block called broadcast. It sends a message to everything in the project. Any script that starts with when I receive that message runs.”
- In Alex's script, after the first say block, add broadcast and create a new message called sam speaks.
- In Sam: replace when green flag clicked with when I receive sam speaks. Keep the say block, then add broadcast with a new message called alex speaks.
- In Alex: start a second script with when I receive alex speaks, then say "Don't forget your torch!" for 2 seconds.
- Click the green flag. Then change Alex's first line to 5 seconds and run it again.
- Ask: Did Sam wait for Alex this time? (Yes. Sam's script only starts when the message arrives, after Alex finishes.)
- Say: “"Now a new scene. When the friends finish talking, they arrive at camp." Add a second backdrop (any outdoor or forest backdrop).”
- In Alex's second script, after the last say block, add broadcast with a new message called scene 2.
- Click the Stage. Add: when I receive scene 2, switch backdrop to the forest backdrop.
- Click the green flag twice.
- Ask: What is wrong the second time? (The backdrop is already the forest at the start.)
- Say: “"We must initialise: set the starting state." On the Stage, add when green flag clicked, switch backdrop to the first backdrop. On each sprite, add go to x and y and show at the start of the green flag script.”
- Tip: Name messages for what happens next (sam speaks, scene 2), not message1 and message2, so they are easy to follow.
Students- Follow the model on their own device, building the same three scripts.
- Change the length of one line and test that the timing still works.
- Add a start-up script and run the project twice to check it resets.
Scratch (online or the offline editor) on a device for each student Projector - 3
Build a three-scene camp story
Main 20–40 minTeacher- Display the build checklist from the resources.
- Say: “Build your own camp story in three scenes: packing at home, arriving at camp, and one thing that happens at camp. Use any two sprites and three backdrops.”
- Say: “Plan first. Spend three minutes writing your scenes and messages in the planning table on your sheet.”
- After three minutes, students build. Move around the room.
- Ask a student whose characters talk over each other: "Which script starts this line, and what message starts it?" (They should find the missing when I receive block or a leftover green flag hat.)
- Ask a student whose story only works once: "What does your project look like before the green flag is clicked a second time?" (Sprites and backdrop are where the last run left them, so they need a start-up script.)
- Say at 10 minutes: "By now you should have finished scene 2. Check it before you start scene 3."
- Tip: Students who want movement can use glide 1 secs to x and y. Remind them to set the start position in the green flag script.
Students- Plan three scenes and the messages that link them.
- Build the story with at least three broadcasts and one backdrop change.
- Write a start-up script and test that the story runs the same way twice.
Planning table on paper, with columns: scene, what happens, message that starts it, message it sends at the endBuild checklist- 1.Two sprites and three backdrops.
- 2.At least three broadcast messages, each with a clear name.
- 3.Characters take turns: no wait blocks used to time a conversation.
- 4.The backdrop changes for each new scene.
- 5.A start-up script on the Stage and on each sprite that resets the backdrop, positions and visibility.
- 6.The story runs the same way when you click the green flag twice.
- 4
Partner test and exit check
Plenary 40–50 minTeacher- Say: “"Swap devices with a partner. Click the green flag twice and check each point on the checklist. Tell your partner one point that works and one to fix." Allow 5 minutes.”
- Then say: "Now answer the exit questions on your own."
- Questions
- 1.Sam's script starts with when I receive alex finished. Alex's script never broadcasts alex finished. What happens? (Sam never speaks, because his script never starts.)
- 2.Why is a broadcast better than wait blocks for timing a conversation? (The next line starts when the message is sent, after the last line has finished, so changing the length of a line does not break the timing.)
- 3.A story works the first time but not the second. What is missing? (A start-up script that resets the backdrop and the sprites when the green flag is clicked.)
- Collect the answers.
Students- Test a partner's project against the checklist and give one strength and one fix.
- Answer the three exit questions alone.
Build checklist Paper for the exit questions
Key vocabulary
event
Something that happens, such as a click or a message, that can start a script.
script
A stack of blocks joined together that runs from top to bottom.
broadcast
A block that sends a named message to every sprite and the stage.
when I receive
A hat block that starts its script when a particular message is broadcast.
backdrop
The picture behind the sprites on the stage.
initialise
Set everything to how it should be at the start, before the program runs.
Differentiation
Support
- Give a printed card of the three modelled scripts (Alex, Sam and Stage) so students can copy the pattern for each new scene, changing only the words and message names.
- Reduce the build to two scenes with two broadcasts, and check the start-up script before adding anything else.
Extension
- Ask students to use broadcast and wait in one place and explain, in a comment on the script, how it differs from broadcast (the sending script pauses until every receiving script has finished).
- Challenge students to make one message start scripts on both sprites at once (for example both characters turn to face the camp fire) and explain why one broadcast can trigger several scripts.
Accessibility
- Keep the vocabulary and the build checklist on the board throughout, with a screenshot of each block next to its name, which helps students new to English and anyone who loses track of the steps.
- Students who find typing slow can use short lines of dialogue; the learning is in the events, not the amount of text.
- Let students who find the screen hard to read zoom in on the code area using the zoom buttons in the Scratch editor.
Assessment
- During the build, check each project against points 3 and 5 of the checklist: no wait blocks timing the conversation, and a working start-up script.
- Collect the exit questions. Question 2 shows whether the student understands why events are more reliable than timing; question 3 shows whether they understand initialising.
Resources
- Scratch on a device for each student
- Starter project built before the lesson (details in the starter step)
- Projector
- Build checklist, displayed and printed
- Planning table on paper
- Paper for the exit questions