The Action Helper
Follow instruction sequences to guide the character to the goal.
- Web browser (Chrome, Edge, Firefox)
- Internet connection
- Scratch 3.0 online editor
🔧 Build Your Directional Maze Puzzle
when [green flag] clicked
go to x: (-180) y: (120)
say [Guide me home!] for (2) seconds
when [up arrow v] key pressed
change y by (10)
when [down arrow v] key pressed
change y by (-10)
when [right arrow v] key pressed
point in direction (90)
change x by (10)
when [left arrow v] key pressed
point in direction (-90)
change x by (-10)
Each arrow key changes either the horizontal X position or vertical Y position.
⚗️ Test your model
| Test Condition / Action | Expected Result |
|---|---|
| Press Right Arrow | Puppy turns right and steps 10 units forward |
| Press Up Arrow | Puppy moves upward toward the open corridor |
| Press Green Flag | Puppy immediately returns to the starting entrance |
Add a shiny golden bone sprite inside the maze that disappears with a happy chime when the puppy touches it!
📖 Our Story & Concepts
Maps and mazes use directions to guide travelers: forward, backward, left, and right. In video games and robotics, a computer screen is like a giant grid of tiny squares. Moving side-to-side changes the X number, and moving up-and-down changes the Y number.
By connecting keyboard keys to directional movement blocks, you create an interactive controller. You decide where the character goes, step by step, solving the puzzle using logic and spatial awareness.
</> Full Annotated Code Walkthrough
// Full Maze Navigation Script
when [green flag] clicked
go to x: (-180) y: (120)
set size to (60) %
say [Help me reach the doghouse!] for (2) seconds
when [right arrow v] key pressed
point in direction (90)
change x by (10)
if then // Green maze hedge
change x by (-10) // Bounce back
end
when [left arrow v] key pressed
point in direction (-90)
change x by (-10)
if then
change x by (10)
end
when [up arrow v] key pressed
change y by (10)
when [down arrow v] key pressed
change y by (-10)
Each arrow key changes either the horizontal X position or vertical Y position.
▷ Expected Results & Troubleshooting
| Test Condition / Action | Expected Result |
|---|---|
| Press Right Arrow | Puppy turns right and steps 10 units forward |
| Press Up Arrow | Puppy moves upward toward the open corridor |
| Press Green Flag | Puppy immediately returns to the starting entrance |
⚑ Extension Challenges & Blueprints
- Level 1: Add hedge collision detection so the puppy cannot walk through the green maze walls.
- Level 2: Place a golden bone in a corner; when touched, play a bark sound and hide the bone.
- Level 3: Add a step counter variable that counts how many arrow taps it took to escape the maze.