repetitionEverywhere's Code

Created by: shr

world

Events

When the world starts
Do:
world.my first method


While ( both ( ( chicken distance to bunny ) > 2 ) and ( square . color == green ) ) is true
Begin:
  Do in order
       chicken turn to face bunny
  bunny turn to face chicken
During:
  Do in order
       chicken move forward 1 meter duration = 0.5 seconds
  chicken.Neck turn backward 0.1 revolutions duration = 0.25 seconds
  chicken.Neck turn forward 0.1 revolutions duration = 0.25 seconds
  chicken turn to face bunny duration = 0 seconds
End:
chicken say Hello


Let move world.animals


When ( ( cow distance to chicken ) < 2 ) becomes true
Do:
cow say Moooooo


When G is typed
Do:
square set color to green


When R is typed
Do:
square set color to red


Methods

  world.my first method ( )
    No variables
       Do in order
       bunny turn to face chicken
  chicken turn to face bunny
  Loop 3 times times
       Do in order
       chicken move forward 1 meter duration = 0.5 seconds
  chicken.Neck turn backward 0.1 revolutions duration = 0.25 seconds
  chicken.Neck turn forward 0.1 revolutions duration = 0.25 seconds
  While ( ( chicken distance to bunny ) > 2 )
       Do in order
       chicken move forward 1 meter duration = 0.5 seconds
  chicken.Neck turn backward 0.1 revolutions duration = 0.25 seconds
  chicken.Neck turn forward 0.1 revolutions duration = 0.25 seconds
  chicken say Hello


fire

Events

When the world starts
Do:
fire.spin like crazy


Methods

  fire.spin like crazy ( )
    No variables
       Do together
       Loop infinity times times
       fire turn left 2 revolutions duration = 4 seconds
  Loop infinity times times
       fire.innerFire turn right 2 revolutions duration = 7 seconds
  Loop infinity times times
       fire.outerFire turn right 2 revolutions duration = 3 seconds
  Loop infinity times times
       fire resize 0.75 likeRubber = false top to bottom ( random number maximum = 0.75 ) style = abruptly
  fire resize 1.33 likeRubber = false top to bottom ( random number maximum = 0.75 ) style = abruptly
  Loop infinity times times
       fire.outerFire resize 1.14 likeRubber = true duration = 2.7 seconds
  fire.outerFire resize 0.88 likeRubber = true duration = 2.7 seconds