Introduction
This method allows the object "Random Guy Eli" to walk
in a some-what natural fashion. This code could be potentially translated
for another charactor object in your Alice world.
Demonstration
Code
Objects
Events
When
the world starts |
Do: |
|
Methods
World.Walk
function ( [123] repeat, [123]
speed, [Obj] object, [Obj] Arm_left,
[Obj] Arm_right, [Obj] Leg_left, [Obj]
Leg_right) No
variables |
|
//
Walk Function | Build 2005.10.10 | G. Andrew
Bowman |
World
set speedMultiplier to speed |
Camera
set vehicle to object |
Loop
repeat times time |
|
Do
together |
|
//
Leg movement |
Leg_left
turn backward 0.1 revolutions |
Leg_right
turn forward 0.1 revolutions |
//
Object movement |
object
move forward 1 meter |
//
Arm movement |
Arm_left
roll left 0.05 revolutions |
Arm_right
roll left 0.05 revolutions |
Do
together |
|
//
Leg movement |
Leg_left
turn forward 0.1 revolutions |
Leg_right
turn backward 0.1 revolutions |
//
Object movement |
object
move forward 1 meter |
//
Arm movement |
Arm_left
roll right 0.05 revolutions |
Arm_right
roll right 0.05 revolutions |
//
Notes |
//
var "speed", should be used as an
indication of strolling, walking, or running |
//
Strolling = "1" |
//
Walking = "3" |
//
Running = "8" |
//
var "repeat", needs to be an even
integer. This number also defines the amount of distance
in metre's |
World.init ( )
No variables |
|
World.Walk
function repeat = 20 speed = 3
object = Random Guy Eli Arm_left = Random
Guy Eli.Torso.LeftArm Arm_right = Random
Guy Eli.Torso.RightArm Leg_left = Random
Guy Eli.LeftLeg Leg_right = Random Guy
Eli.RightLeg |
|