In order for your Animator State Machine to work in-game, the following Parameters are triggered from the Mecanim Class.
These parameters are required for a basic entity.
Parameter Name |
Parameter Type |
Description |
MovementState |
INTEGER |
0 for Idle, 1 for Walk, and 2 for Running |
Speed |
FLOAT |
Controls the speed of the entity for Root Motion |
Attack |
TRIGGER |
Triggers the Attack animation |
Jump |
TRIGGER |
Triggers the Jump Animation |
IsAlive |
BOOL |
Triggers the Wakeup Animation |
IsMoving |
BOOL |
True if entity is moving |
IsDead |
BOOL |
Triggers the Death Animation |
The following Parameters is what the full Mecanim Class allows. If a trigger or value is not available, the mecanim class will fail the call quietly, and continue.
The Animator State Machine uses bool for values that are explicitly set and unset. That is, if you set IsDead to false, it will stay false until you change it.
The following Bool Parameters are supported in the MecAnimSDX Class
Parameter Name |
Parameter Type |
Description |
IsDead |
BOOL |
True if Entity is Dead, otherwise False |
IsAlive |
BOOL |
True if the Entity is awake and alive. |
IsMoving |
BOOL |
True if the Entity is moving |
IsEating |
BOOL |
True if the Entity is Eating |
IsCrouching |
BOOL |
True if the Entity is Crouching |
IsStunned |
BOOL |
True if the Entity is Stunned |
IsSleeping |
BOOL |
True if the Entity is Sleeping |
The Animator State Machine uses integer for numeric values.
For the MecAnim SDX class, we use Integer types to offer Index values. That is, they are used if you want to add multiple animations for the same type of state. For example, if we have 5 different animation attacks, we can assign a unique attack index for each Transition. Attack number 1, would have an AttackIndex of 0. Attack number 2 would have an AttackIndex of 1. This allows us to have more variety in the various types of animations than we have had before.
Parameter Name |
Parameter Type |
Description |
AttackIndex |
INTEGER |
A 0 to ... range of numbers to uniquely identify transitions for Attack animations |
SpecialAttack |
INTEGER |
A 0 to ... range of numbers to uniquely identify transitions for Special Attack animations |
SpecialSecondAttack |
INTEGER |
A 0 to ... range of numbers to uniquely identify transitions for Special Secondary Attack animations |
RagingIndex |
INTEGER |
A 0 to ... range of numbers to uniquely identify transitions for any Raging animations |
ElectrocutionIndex |
INTEGER |
A 0 to ... range of numbers to uniquely identify transitions for electrocution animations |
CrouchIndex |
INTEGER |
A 0 to ... range of numbers to uniquely identify transitions for crouching animations |
StunIndex |
INTEGER |
A 0 to ... range of numbers to uniquely identify transitions for any Stunned animations |
SleeperIndex |
INTEGER |
A 0 to ... range of numbers to uniquely identify transitions for Sleeper Animations |
HarvestIndex |
INTEGER |
A 0 to ... range of numbers to uniquely identify transitions for any harvesting animations |
PainIndex |
INTEGER |
A 0 to ... range of numbers to uniquely identify transitions for any Pain animations |
DeathIndex |
INTEGER |
A 0 to ... range of numbers to uniquely identify transitions for any Death Animations |
RunIndex |
INTEGER |
A 0 to ... range of numbers to uniquely identify transitions for any Running Animations |
WalkIndex |
INTEGER |
A 0 to ... range of numbers to uniquely identify transitions for any Walking Animations |
IdleIndex |
INTEGER |
A 0 to ... range of numbers to uniquely identify transitions for any Idle Animations |
JumpIndex |
INTEGER |
A 0 to ... range of numbers to uniquely identify transitions for any Jump Animations |
We use Integers for other flags as well
Parameter Name |
Parameter Type |
Description |
MovementState |
Integer |
0 for Idle, 1 for Walking, and 2 for Running |
We use Float values when we will need decimal precisions, like for forward speed, when using Root Motion
Parameter Name |
Parameter Type |
Description |
Forward |
FLOAT |
The current speed of the entity |
Strafe |
FLOAT |
The speed in which its strafing |
IdleTime |
FLOAT |
The Idle time in the mecanim class |
Triggers are one-time events per call. We use triggers to let the Animator know we want to do an action once.
Parameter Name |
Parameter Type |
Description |
Attack |
TRIGGER |
This triggers one of the attack animations |
Pain |
TRIGGER |
This triggers the Getting Hit Animation |
Alive |
TRIGGER |
This tells the entity to wake up |
Jump |
TRIGGER |
This tells the entity to Jump |
SpecialAttack |
TRIGGER |
This tells the entity to trigger a Special Attack |
SpecialSecondAttack |
TRIGGER |
This tells the entity to trigger a Second Special Attack |
Raging |
TRIGGER |
This tells the entity to begin Raging |
Electrocution |
TRIGGER |
This tells the entity to begin being electrocuted |
Harvest |
TRIGGER |
This tells the entity to trigger harvest animation |
Crouch |
TRIGGER |
This tells the entity to begin crouching |
Created with the Personal Edition of HelpNDoc: Free Web Help generator