Now your going to choose a new sprite (character) to run your maze. ... Let's
create a script on the maze runner that says everytime it runs into a wall it will
meow.
Scratch Lessons:
Make a Maze Game, Part 1 1. Open Scratch. Hold your mouse button down on the cat and press “delete” to get rid of it.
2. Now your going to choose a new sprite (character) to run your maze. Press the “choose new sprite” button.
3. Now, choose any sprite you want to run in your maze.
1
4. Copy the code blocks below so that your animal moves using the arrow keys.
5. Next, click on the “Paint new Sprite” button in order to paint your maze.
2
6. Before you get started painting your maze, click the zoom out magnifying glass see the whole paint canvas.
so you can
7. Now, paint a maze using just the rectangle tool. Make sure there is a way to get to the end of the maze (don’t make it all dead ends).
8. If you like the results, go to step 8. Otherwise you can always edit your work by clicking the “Costumes” tab and pressing “Edit”.
3
9. It’s likely that your sprite running the maze will be too big for the maze. Click on the “Shrink Sprite” button and make your Sprite much smaller.
10. Let’s create a script on the maze runner that says everytime it runs into a wall it will meow. Keep in mind that you can choose any sound you want...I’m just choosing “meow” because I chose a cat. Click on the “Sounds” tab and choose “Import.”
11. Choose the sound you want.
4
12. Click on the “Scripts” tab.
13. Now click on the icon of your maze. Change the name from “Sprite” to “Maze”.
5
14. Click on the icon of your maze runner and re-name it “maze runner”.
15. Click on the “Control” category. Drag the “When flag clicked” and “forever” code blocks.
6
16. Drag “If” inside “Forever”.
17. Now, switch to the “Sensing” category. Press the arrow next to the “touching” code block. Choose “Maze” 1
2
3 18. Drag “Touching Maze” next to “If”.
7
19. Finally, switch to the “Sound” category. Drag “Play sound until done” inside the “if” code block.