Coding Events: Triggers and Responses
Lesson preview: the Mini Lesson and Vocabulary are open to everyone. Guided practice, exercises, the parent checklist and the printable PDF worksheet come with full access (free 7-day trial or membership).
Learning Objectives
- 1Explain what an event is in Scratch and give three examples of event triggers
- 2Match each Scratch event trigger to the response it causes in a program
- 3Describe how events make programs interactive by responding to user actions
Mini Lesson
In Scratch, an event is something that happens to start or change a program. Events are triggers — they are the "if this happens" part of a rule. When an event occurs, the connected script (the response) runs. Events make programs interactive because they let the program react to what the user does.
Common Scratch Event Triggers
- "When green flag clicked" — the most common trigger; starts the program.
- "When key [space/arrow/letter] pressed" — triggers a script when a keyboard key is pressed.
- "When this sprite clicked" — triggers a script when the user clicks on the sprite.
- "When backdrop switches to [backdrop name]" — triggers when the background changes.
- "When loudness > [number]" — triggers when a sound (microphone) gets loud enough.
- "When I receive [message]" — triggers when another sprite sends a broadcast message.
- "When timer > [number]" — triggers when the built-in timer exceeds a set value.
- "Broadcast [message]" — sends a message that can trigger another sprite's script.
How Events Work
Think of events like light switches: the switch (trigger) is connected to the light (response). When you flip the switch, the light turns on. In Scratch, clicking the green flag is the switch and the script below it is the light. You can have many different switches — each one starts a different part of your program.
You can use "broadcast" and "when I receive" to create conversations between two sprites — one sprite broadcasts a message and the other reacts when it receives it.
Unlock the full HSEA system for 7 days.
Add your first kid profile and your 7 days start: every lesson in every grade, saved progress for each child. Nothing to set up, no card required, nothing to cancel.
- ✓ All 1,680 lessons, Grades 1–6, every subject
- ✓ Profiles + saved progress for every kid
- ✓ Printable lessons with answer key