Game Development Reference
In-Depth Information
function Soldier_CreateSoldierStateMachine(soldier)
Soldier_CreateWeapon creates an animated weapon mesh attached to the agent:
function Soldier_CreateWeapon(agent)
Soldier_CreateWeaponStateMachine creates and initializes a fully connected
animation state machine configured for our weapon mesh:
function Soldier_CreateWeaponStateMachine(weapon)
Soldier_IsFalling returns a true or false Boolean value depending on whether the
soldier is considered free-falling in air. Small falls such as brief steps off the ground run-
ning down a ramp, will not return true from this function:
function Soldier_IsFalling(agent)
Soldier_IsMoving returns true or false if the agent is considered to be moving in any
direction; again, small amounts of movements will return false:
function Soldier_IsMoving(agent)
Soldier_OnGround returns true or false if the agent is considered to be touching the
ground. Small fluctuations of the agent off the ground will still return true:
function Soldier_OnGround(agent)
Soldier_SetHeight properly adjusts the agent's collision capsule with the physics
environment and properly offsets the soldier's mesh to the new height:
function Soldier_SetHeight(agent, soldierMesh, newHeight)
Soldier_SetPath assigns a path to an agent and adjusts the agent's facing direction
toward the starting position of the path, if required:
function Soldier_SetPath(agent, path, cyclic)
Soldier_SlowMovement artificially dampens the agent's velocity based on the rate of
deceleration. This function is useful in order to adjust the speed of the agent, when it goes
from running to idle, to matching the animation playback:
Search WWH ::




Custom Search