Assignment_4

Created by Kevin Kihlstrom

You need to download Java software in order to view this Alice world. Please visit this page: http://www.alice.org/applet/requirements/

Created with Alice, the easy-to-learn programming system. Provided free as a public service by Carnegie Mellon University


If you don't see 3d graphics on this page, click for help.

Assignment_4's Code

Created by:

world

Events

When the world starts
Do:
world.my first method


Methods

  world.my first method ( )
    Is facing = true , Is Laying = true
       Is facing set value to ( castle is in front of trex )
  If Is facing
       trex move amount = 1 meter toward target = castle.castleMain
  Else
    trex orient to castle.castleMain
  Wait 0.5 seconds
  Loop 5 times times
       Do together
       trex move up 3 meters
  trex turn at speed left speed = 1.5 revolutions per second
  trex.leftThigh.leg.lowerLeg.foot roll at speed right speed = 0.25 revolutions per second
  trex.rightThigh.leg.lowerLeg.foot roll at speed left speed = 0.25 revolutions per second
  Do together
       trex move down 3 meters
  trex turn at speed left speed = 1.5 revolutions per second
  trex.leftThigh.leg.lowerLeg.foot roll at speed right speed = 0.25 revolutions per second
  trex.rightThigh.leg.lowerLeg.foot roll at speed right speed = 0.25 revolutions per second
  trex.leftThigh say Now Im dizzy!
  Is Laying set value to true
  While Is Laying
       trex roll at speed right speed = 1 revolutions per second duration = 0.25 seconds
  trex move right 3 meters duration = 0.25 seconds
  Is Laying set value to ( light is above ground )