Goal: Shake the ball and find out the answer to your question.
Vocabulary: seth (setheading), random
t1, repeat 10 [
seth random 360
fd 15 bk 15
fd 15 bk 15
setsh pick [sure! of_course! please_ask_later totally! nope yes! no no_way right_on duh!]
- Seth stands for "set heading" and is always followed by a number. Seth 0 points the turtle straight up. Seth random 360 means, "Choose any number from 0 to 359 and point to that heading." (There are 360 degrees in a circle, so the turtle might point in any direction.)
In the shake procedure, the magic 8-ball shakes a little bit before giving an answer.
Try different numbers after fd and bk.
What happens if the numbers are all the same?
What happens if the numbers are different?
Experiment with other variations on the procedure to get a different jiggling effect:
Try changing the number after seth random or omitting that command.
Try including wait 1 in one or more places.
Try alternating between two shapes which are identically-sized.
On Your Own - Project Ideas
Instead of moving the ball forward and back, try making the 8-ball shape appear to spin. (See "Animate Me 5" for instructions on how to create rotated versions of a shape and include them in a procedure.)