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).
What you will learn
- 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 Blocks
- "When green flag clicked" — the most common trigger; starts the program.
- "When [space/arrow/letter] key 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 goes past a set number.
- "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.
Words to know
Event
Something that happens in a program — like a click or key press
e.g. The green flag click is the starting event.
Trigger
The action that causes an event, such as pressing a key
e.g. The space bar is a trigger for the jump.
Response
What the program does after the trigger
e.g. My sprite's response was to spin.
Broadcast
A message one sprite sends to other sprites
e.g. I broadcast "go" to start every sprite at once.
Interactive
A program that reacts to what the user does
e.g. My interactive game responds to the arrow keys.
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,880 lessons, Grades 1–6, every subject
- ✓ Profiles + saved progress for every kid
- ✓ Printable lessons with answer key