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

animate bugs 1 2 3 4 5
Animate Bugs 2
Download
20 KB


Goal:   You can make a bug appear to move by telling the turtle to change its shape back and forth between two slightly different animation shapes.


Screenshot


Vocabulary:   setsh (setshape), wait

Code
Shapes
Project Map

code


Notes

  1. Start with your Animate Bugs 1 file.   You always start with the previous MIA file so you don't have to redraw things or rewrite code.

  2. From the File menu choose Save Project As.   Name your file Animate Bugs 2 since you're working in project number two now.

  3. Hatch a new turtle onto the page by clicking on the turtle button in the toolbar and then clicking on the page.   You only need one turtle for now.

  4. Now you're ready to teach the turtle a new word with a procedure! In the Procedures tab, type the move procedure as shown in the code section above.  

    Procedures ALWAYS start with the word to.   This procedure is called move so the first line of code is to move.

    Setsh means "set shape."   Setsh "bug1 tells the turtle to wear the bug1 shape.   Setsh "bug2 tells the turtle to wear the bug2 shape.   Don't forget the " before the name of the shape!

    Wait 2 tells the turtle to wait a little bit before going on to the next command.  
    Wait 10 means "wait one second."  
    Wait 1 means "wait 1/10 of a second."
    Wait 2 means "wait 2/10 of a second."   This is a good moving speed!

    Procedures ALWAYS finish with the word end on its own line.

  5. Create a button and label it move.   Set the button instruction to move and make it do it Forever so that your character will keep on moving.   Try it out!

  6. Save your file!




What If?
What happens if you try wait 1 or wait 5 or wait 10?


Challenge
Can you change the move procedure to include all three shapes in your Shapes tab?


On Your Own - Project Ideas





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