Goal: You can make your person move across the screen while dancing if you tell it to move forward a little bit every time it changes shape.
Vocabulary: setsh (setshape), wait, fd (forward)
- Start with your Animate Me 2 file. From the File menu choose Save Project As. Name the file Animate Me 3 because now you're working on the third project.
- Adjust your dance procedure so it looks like the one above in the code section. Now the dance procedure includes fd 5 which means "forward 5" and moves the shape forward 5 tiny turtle steps.
- Remember that new turtles are always facing straight up. This person is really a turtle in disguise. We need to turn the turtle so that the person will move sideways instead of straight up.
Down in the command center, type: seth 90
We say it, "set heading 90." We are telling the turtle, "Set your heading to 90 degrees." That means: "No matter which way you were already facing, face straight to the right."
(Be sure to hit the Enter/Return key after you type seth 90. You will not see any change in the shape itself, but the turtle wearing this shape will face straight to the right and will move to the right when you click the button. You only need to do this one time. The turtle will remember which way it is facing, next time you open the project.)
- Set the dance button to Forever so that your character will keep on dancing.
- Make a stopall button with a stopall instruction, to stop all of the action on the page. (Stopall is one word and it tells all of the turtles and actions to stop.)
- Save your file!
What happens if you type seth 100
or seth 120
in the command center?
What happens if you type a larger number after fd
Can you make your person dance straight to the left?