Sie sind auf Seite 1von 3

Alice Coding 1001

Note to programmer: The two regular methods are world methods. The Waggle and
Arms Swim are methods for the lilfish. Waggle is already supplied but must be edited and
the other method, Arms Swim, must be made from scratch. The programming for the
methods is presented by simply showing boxes:
Example
First method [happy fish]
Loop [2 times]
o Fish wave [2 times] [3 sec]
Print: Hi
This simply means you will create a new method if one is not available. In this case, first
make a loop two times box and put the fish method wave inside of the loop box. It will
make the fish wave two times for a duration of 3 seconds. The high command is not in
the box but is at the same level as the loop command. If this program works correctly
(and you put happy fish run when world starts in Events and the camera is focused on the
fish), it should show a fish waving four times in six seconds and then a box should appear
below the play screen that says Hi. Also Lilfish = fish, and this program is best done
with Alice style coding NOT JAVA (in preferences)! Good luck!
<start>
Fishy Buisness_yourlastname.a2w
Objects
Open Alice.
Go to templates and create a world with grass.
Click add objects.
In the Ocean folder, add a Ocean floor [make it twice the size of the original ocean floor]
and a fish.
Make sure the fish is in the ocean above the sand and the camera is focused in on the fish.
In the Shapes folder, add a torus [you can change it to any color you would like (I chose
yellow) in the properties tab for torus], make sure that it is on the same level as the fish,
tumble the object so that it looks like an open ring almost face down (the fish should
eventually be able to swim around the torus), and place the torus in a place that is away
from the fish in the ocean scene.
Click done.

Program
My First method [fish ring]
Do in order
o Fish point at torus
o Fish Jaw say "What a pretty ring!"
o Fish move forward [distance to the torus minus 1m]
o Fish turn left [.25]
o Fish turn left 2 as seen by the torus [duration 2 sec]
o Torus roll torus left 5 revolutions (You must use trial and error To
find the best result tumble the ring. If the fish goes around
backward change the step right above this one to "right")
o Do Together
Camera orient to fish [0 sec]
Camera move to fish [0 sec]
Camera turn right 0.5m [0sec]
Camera move backward 3m [0 sec]
Camera move up 0.5m [0 sec]
Camera turn forward 0.02m [0 sec]
o Fish turn to face torus
Do Together
o Fish right eye 1 resize 2
o Fish left eye 2 resize 2
Do Together
o Fish right eye 1 resize
o Fish left eye 2 resize
o Fish Jaw say: I like this ring [2 sec]
o Print: You found the ring!

Go to the fish waggle method in the fishes methods and delete the last While.
Also create a new method for the fish called Arms Swim.
Arms Swim
Do in order
o Do together
Fish left fin roll left .25 rev
Fish right fin roll right .25 rev
o Do together
Fish left fin roll right .25 rev
Fish right fin roll left .25 rev
My second method [fish move] (under world create new method)
Do in Order
o Do together
Fish left fin roll right .2 rev
Fish right fin roll left .2 rev
o Do Together
Fish waggle
Arm Swim
o Do Together
Fish waggle
Arm Swim
o Do Together
Fish waggle
Arm Swim
o Do Together
Fish waggle
Arm Swim
o Do Together
Fish waggle
Arm Swim
Events
In events when world starts:
My first method [fish ring]
My second method [fish move]
Fishy Buisness_yourlastname.a2w in your inbox
</End>

Das könnte Ihnen auch gefallen