Game Development Reference
In-Depth Information
Commands
Commands for an animation controller dictate exactly how the agent communicates with
the body. Instead of directly acting on each command the agent issues to the body, the an-
imation controller is free to decide how each command is executed. This might seem
counter-intuitive to what would be desirable from an agent's point of view, but this freedom
allows the body to easily handle things such as falling, pain animations, and death anima-
tions:
SoldierController.lua :
SoldierController = {};
-- Supported commands that can be requested.
SoldierController.Commands = {
CHANGE_STANCE = "CHANGE_STANCE",
DIE = "DIE",
IDLE = "IDLE",
MOVE = "MOVE",
SHOOT = "SHOOT"
};
-- Supported soldier stances.
SoldierController.Stances = {
CROUCH = "CROUCH",
STAND = "STAND"
};
-- Additional supported commands that cannot be requested.
SoldierController.PrivateCommands = {
FALLING = "FALLING"
};
Search WWH ::




Custom Search