If you don't see 3d graphics on this page, click for help.
When the world starts | ||
Do: |
|
world.my first method ( )
No variables |
|
world.runAndChase animal = Chicken person = aliceLiddell | |
( world.personToMyRight person1 = wheely person2 = wizard person3 = troll ) turn right 1 revolution | |
( world.personToMyRight person1 = wheely person2 = troll person3 = wizard ) turn right 1 revolution | |
( world.personToMyRight person1 = troll person2 = wizard person3 = wheely ) turn right 1 revolution | |
( world.personToMyRight person1 = troll person2 = wheely person3 = wizard ) turn right 1 revolution |
world.runAndChase ( [Obj] animal, [Obj] person)
No variables |
||
Do together | ||
animal turn to face person | ||
person turn to face animal | ||
animal move forward ( ( ( animal distance to person ) - 1 ) ) | ||
animal turn right 0.25 revolutions | ||
animal turn left 1 revolution asSeenBy = person | ||
animal say catch me if you can | ||
animal turn right 0.25 revolutions | ||
Do together | ||
animal move forward 20 meters duration = 1 second | ||
person move forward 20 meters duration = 1 second |
Object world.personToMyRight ( [Obj] person1, [Obj] person2, [Obj] person3)
No variables |
||||
If ( both ( person2 is to the right of person1 ) and ( not ( person3 is to the right of person1 ) ) ) | ||||
Return person2 | ||||
Else | ||||
If ( both ( person2 is to the right of person1 ) and ( person3 is to the right of person1 ) ) | ||||
If ( ( person1 distance to person2 ) < ( person1 distance to person3 ) ) | ||||
Return person2 | ||||
Else | ||||
Return person3 | ||||
Else | ||||
Return person3 | ||||
Return <None> |