ActionClip

Attached to a ActionLayer an ActionClip control one or multiple motions based on the ClipType used to creating it. They will allow you to blend either a single Action or multiple actions linearly, in two dimension or using an arbitrary number of actions simultaneously. ActionClip can also control the machine state of the ActionLayer it is connected with by using the ClipType AnyState or ExitState.

See Also

Note
An ActionClip base is a Controller which is a global asset that can be used by multiple resources at the same time; when specifying an action connected to a motion this action will be set as a string instead of (the usual) reference. This way the Controller can be used by more than one resource.
Warning
When evaluating an ActionClip it might happen that an error occur. Errors are generate either by specifying a variable that cannot be found on the host resource connected to the Controller. Same scenario can occur with a specified action. In case an error is generated the execution of the Controller is stalled as it cannot evaluate the current/next machine state. To fix the error either call the SetVariableMotion(1d, 2d or Free) or SetMotion(1d, 2d or Free); theses functions will reset the error state.

Static Variables


Name Description
actionlayer The ActionLayer the current ActionClip belongs to.
group Reference to the ClipGroup the ActionClip belongs to (if any).
type Represent the ClipType of the ActionClip.
uid A unique id to identify the current ActionClip.

Variables


Name Description
name A unique name to identify the current ActionClip within its ActionLayer.
actuators Enable or disable the use of actuators within the active motions associated to the ActionClip.
flags Controls the various flags of the current ActionClip.

Functions


Name Description
AddMotion Add a new channel to the current action (up to 256).
RemoveMotion Remove an existing motion based on its index.
SetMotion Set the motion of a kSingle ActionClip.
SetMotion1d Set the motions of a kBlend1d ActionClip.
SetVariableMotion1d Controls the variable that will be use to evaluate the kBlend1d ActionClip.
SetMotion2d Set the motions of a kBlend2d ActionClip.
SetVariableMotion2d Controls the variables and interpolation method use when evaluating a kBlend2d ActionClip.
SetMotionFree Set the motions of a kBlendFree ActionClip.
SetExitState Controls the behavior of an kExitState ActionClip.
SortMotions Sort all existing motions based on their position (either on the X or XY axis).

ClipType


Represent the type an ActionClip can be created with which will in turn dictate its behavior and properties.

  • kSingle: Provide a way to connect a single action.
  • kBlend1d: Can contain multiple actions that will be linearly blended based on the value of an existing controller variable.
  • kBlend2d: Multiple actions blended in two dimension; actions are first defined then placed on the X and Y axis.
  • kBlendFree: Allows you to set up multiple actions and specify how much influence each of them will have on the final mix.
  • kAnyState: This type is acting as a branch that will be evaluated by the system regardless of the state the tree is currently in.
  • kExitState: Specify the termination of the action layer; different termination strategies can be set based on your requirements.

Example

-- Access and print the value of the ClipType kBlend2d:
print( "The value of kBlend2d is " .. ActionClip.ClipType.kBlend2d )

ExitStrategy


The type of strategy to use with an ExitState ActionClip.

Example

-- Access and print the value of the ExitType kTerminate:
print( "The value of kTerminate is " .. ActionClip.ExitStrategy.kTerminate )




NRG - API 2022.4.384543 - Fri Nov 4 2022
Copyright © 2022 nrgcore.com. All Rights Reserved. Terms of Service - Privacy Policy - EULA