scratch exercise 2: sense the world - using conditional...

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.

Upload: others

Post on 23-Sep-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Scratch Exercise 2: Sense the World - Using Conditional ...gk12.cis.ksu.edu/uploads/lesson_material/file/37/... · Scratch Exercise 2: Sense the World - Using Conditional Statements

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.cis.ksu.edu/uploads/lesson_material/file/37/... · Scratch Exercise 2: Sense the World - Using Conditional Statements

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.cis.ksu.edu/uploads/lesson_material/file/37/... · Scratch Exercise 2: Sense the World - Using Conditional Statements

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.cis.ksu.edu/uploads/lesson_material/file/37/... · Scratch Exercise 2: Sense the World - Using Conditional Statements

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.cis.ksu.edu/uploads/lesson_material/file/37/... · Scratch Exercise 2: Sense the World - Using Conditional Statements

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

Back to Nebo Scratch Programming Projects Page