Transitions are used to tell your machine state to jump from one state to another depending on the result of a logical expression. A transition can be immediate or not; meaning that if it is immediate as soon the condition is true the state will automatically change.
On the other hand, a non-immediate transition will wait until the duration of the Action (minus threshold and duration time setup); in other words, delay the jump to the next machine state.
See Also
Static Variables
Variables
Name | Description |
threshold | Relative value to offset the end time of the Action to perform a state jump. |
Declaration Range 0.0 to 1.0
|
duration | Defines the total time of the Transition (where 1.0 = 1 sec. ). |
Declaration Range 0.0 to 5.0
|
offset | Relative value to set an offset to next state Action. |
Declaration Range 0.0 to 1.0
|
flags | Bit mask of options currently applied to the Transition. |
Declaration
Cap | Value | Description |
TRA_FLAG_ENABLED | bit.lshift(1,0) | Determine wheter or not the Transition is active. |
TRA_FLAG_IMMEDIATE | bit.lshift(1,1) | Controls if the sate jump should happen immediately or at the end of the Action. |
TRA_FLAG_EQUALITY | bit.lshift(1,2) | Controls the default value of the condition evalulated by the Transition (either true or false ). |
TRA_FLAG_SELECTED | bit.lshift(1,3) | Controls selection state of the Transition. |
TRA_FLAG_ERROR | bit.lshift(1,4) | Hint that an error occur while processing the Transition. |
|
enabled | Enable or disable the active Transition. |
Declaration
|
immediate | Force the state jump to occur as soon as the Transition logical expression(s) is validated. |
Declaration
|
equality | Base value to use for the Transition logical expression. |
Declaration
|
Functions
Name | Description |
SetLink | Create a bridge between two ActionClip where the active Transition should be placed. |
Declaration bool SetLink( const ActionClip *src, const ActionClip *dst ) Parameters
src : Reference to the ActionClip to use as source.
dst : Reference to the ActionClip to use as destination.
Return Value
false if either the source or destination reference is invalid; true if the bridge is successfully established.
|
AddCondition | Creates a new condition slot. |
Declaration unsigned char AddCondition( void ) Return Value
Index of the newly created slot.
|
RemoveCondition | Helper to remove a particular condition by index. |
Declaration bool RemoveCondition( int index ) Parameters
index : Index of the condition to remove.
Return Value
true on success; false if the condition index provided is invalid.
|
SetCondition | Function to modify a certain condition slot using its index as key. |
Declaration bool SetCondition( unsigned char index, unsigned int variable, const StencilFunction expression, bool and, float value ) Parameters
index : Index of the condition slot to update.
variable : Unique id of the Variable to evaluate.
expression : StencilFunction that determine the logical operation of the condition.
and : Force the condition to be evaluated as a AND instead of a OR (default).
value : Value to evaluate the condition line with.
Return Value
false if the condition index is out of scope; else return true if the condition have been successfully modified.
|