Home
Project Folders
Teacher Resources
Student Resources
En ESPAÑOL
How Do I?
Vocabulary
MWForum
Site Map
Search
Our Team

obstacle course 1 2 3 4 5 6 7
Obstacle Course 4
Download
8 KB


Goal:   Make something happen when the turtle touches a rock or the pond.


Screenshot


Vocabulary:   announce, bk (back)

Code
Shapes
Project Map

code


Notes

Be sure the turtle has the OnClick rule as fd speed / 10 and is set to Forever.

  1. In the "Painting/Clipart" palette, choose a shade of blue you like and draw a pond.   Choose a shade of brown or gray and draw some rocks.   (If you like, you can first draw them in black and then fill them with brown or gray.)

  2. Right-click/ctrl-click on the color of your rocks to open the dialog box for that color family.

    In the white box next to turtle, type:
    announce [You hit a rock! Back up!] bk 50 stopall
    Keep it set to Once.   Click OK.

    Now when the turtle touches a rock, an announcement will pop up with the list of words in brackets.   After you click OK at the bottom of the announcement, the other instructions will run.

    Bk 50 will move the turtle back 50 tiny turtle steps.  

    Stopall will stop all action on the page.   You will have to click the turtle to start him moving again.

    Note: When you program a color (when you write an instruction for it), it works for every shade of that color, from the lightest to the darkest.   So you could make rocks that are different shades of brown (or gray) and the instruction will still work.

  3. Next, open the dialog box for the color of your pond.   In the white box next to turtle, type:
    announce [You reached the pond!] fd 25 stopall
    Keep it set to Once.   Click OK.

    Now when the turtle touches the pond, an announcement will pop up with the list words in brackets.   After you click OK, the turtle will move forward 25 tiny turtle steps (to get farther into the pond) and then stop.




What If?
What happens if you remove the stopall command from the instructions for the colors?


Challenge
Try writing your own announcements for the brown and blue colors.


On Your Own - Project Ideas
Can you make the turtle do something special when it reaches the pond, like turn in a circle, or jump up and down, or get bigger and smaller?





© copyright 2001 - 2016  OpenWorld Learning.   All rights reserved.