5
Scratch Exercise 2: Sense the World - Using Conditional Statements Step 1: Draw a Maze We need to create a maze to act as a barrier for our main character. We will create another sprite that acts as the maze. 1. Click on the "Paint New Sprite" icon 2. Use the "zoom out tool" on the drawing program to zoom all the way out. 3. Click the "Rectangle Outline Tool" and draw a border around the world.

Scratch Exercise 2: Sense the World - Using Conditional ...gk12.cs.ksu.edu/.../file/37/introduction_to_scratch__exercise_2.pdf · Scratch Exercise 2: Sense the World - Using Conditional

  • Upload
    others

  • View
    19

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Scratch Exercise 2: Sense the World - Using Conditional ...gk12.cs.ksu.edu/.../file/37/introduction_to_scratch__exercise_2.pdf · Scratch Exercise 2: Sense the World - Using Conditional

Scratch Exercise 2: Sense the World - Using Conditional Statements

Step 1: Draw a Maze

We need to create a maze to act as a barrier for our main character. We will create another sprite that acts as

the maze.

1. Click on the "Paint New Sprite" icon

2. Use the "zoom out tool" on the drawing program to zoom all the way out.

3. Click the "Rectangle Outline Tool" and draw a border around the world.

Page 2: Scratch Exercise 2: Sense the World - Using Conditional ...gk12.cs.ksu.edu/.../file/37/introduction_to_scratch__exercise_2.pdf · Scratch Exercise 2: Sense the World - Using Conditional

4. Use the "Rectangle Filled Tool" to draw some barriers to create a maze.

5. Click "OK" to finish your drawing.

6. Change the name of this new sprite to "Maze"

Page 3: Scratch Exercise 2: Sense the World - Using Conditional ...gk12.cs.ksu.edu/.../file/37/introduction_to_scratch__exercise_2.pdf · Scratch Exercise 2: Sense the World - Using Conditional

Step 2: Bounce off the Maze

1. Go back to the "Eater" sprite's scripts.

2. Drag a "When Green Flag Clicked" and a "Forever if" into the scripts field.

3. Drag a "touching" hexagon from the sensing menu. Select "Maze" from drop down list.

Page 4: Scratch Exercise 2: Sense the World - Using Conditional ...gk12.cs.ksu.edu/.../file/37/introduction_to_scratch__exercise_2.pdf · Scratch Exercise 2: Sense the World - Using Conditional

4. Back in the Motion menu, add a "turn 15 degrees" and change value to "180." Add a "Move 10 steps" block.

5. Test your program. Click the green flag and use the arrow keys to direct your sprite into the wall. It should

bounce and turn around.

Page 5: Scratch Exercise 2: Sense the World - Using Conditional ...gk12.cs.ksu.edu/.../file/37/introduction_to_scratch__exercise_2.pdf · Scratch Exercise 2: Sense the World - Using Conditional

Scratch Exercise 3: Something to Eat, Conditionals, Variables, Hiding, and Sound.

Back to Nebo Scratch Programming Projects Page