Menu
Lumberyard
Legacy Reference

Using Procedural Clips in Fragments

Procedural clips are code snippets that you insert into fragments and run alongside animation clips in that fragment. Like animation clips, procedural clips can be started, stopped, and blended. They are grouped into Lumberyard (CryAction) and game (GameDLL) types.

Procedural clips can range from playing sounds, controlling joints on a character, or aligning an entity to a location. Procedural clips communicate with game code by means of parameters or procedural contexts.

To edit procedural animation clips, you use the Fragment Editor within Mannequin Editor.

To add a procedural clip to a fragment

  1. In Mannequin Editor, from the Fragments Browser, select the applicable fragment or create a new fragment.

  2. Add a procedural layer to the fragment by right-clicking on the scope for the fragment in the Fragment Editor, going under Add Layer, and clicking ProcLayer. It is not possible to add procedural clips until there is a procedural layer available.

  3. Double-click in the timeline on the ProcLayer to add a new empty procedural clip.

  4. Set the procedural clip Type property in the Procedural Clip Properties pane.

CryAction Procedural Clips

The following are classified as CryAction procedural clips.

ActionEvent clip

Sends a CryMannequin event to the action controlling this fragment. Specifically, calls IAction::OnActionEvent.

Event Name

The name of the event to send.

AimPose clip

Low-level clip to start an AimPose asset. Uses the AimTarget parameter as the target, if it exists. If not specified, the target is 10m in front of the entity.

Animation

The Aimpose asset.

Blend

The fade-in duration.

Blend Time

The smoothing time for the spherical coordinates. Higher numbers mean the longitude and latitude have faster smooth aiming at the target.

Animation Layer

The layer (0–16) to play the Aimpose on.

Note

This works differently than the layer parameter inside the LookPose procedural clip, which is a layer index relative to the scope's first animation layer. For more information on scopes, see Mannequin Scopes.

AISignal clip

Sends an AI signal directly to the AI actor interface of the entity on which the clip is playing.

EnterAndExitSignalNames

Signal names sent on the start and finish of the clip, separated by a | character.

AttachEntity clip

Attaches an entity to a specific attachment point, and then detaches it on exit.

Attachment Name

The name of the attachment point.

Param Name with EntityId

The name of the parameter that stores the EntityID of the entity to attach.

AttachProp clip

Attaches a .chr, .skel, or .cga to a specific attachment point (and detaches on exit).

Object Filename

Name of the .chr, .skel, or .cga to attach.

Attachment Name

The name of the attachment point.

Audio clip

Runs the audio translation layer (ATL) triggers.

Start Trigger

(Optional) ATL trigger to execute at the start.

Stop Trigger

(Optional) ATL trigger to execute at the end.

Attachment Joint

(Optional) name of a joint on which to execute the trigger.

Play Facial

Requests facial animation to match the sound.

Sound Flags

(Reserved)

FlowGraphEvent clip

Sends events to the flow node Actor ProcClipEventListener.

Enter Event Name

Name of the event to send at start.

Exit Event Name

Name of the event to send at end.

HideAttachment clip

Hides an attachment for the duration of the clip.

Attachment Name

Name of the character attachment to hide.

IKLayerWeight clip

Controls the weight of an animation layer by a joint's X value.

Joint Name

The joint whose X value controls the layer weight.

Scope Layer

The index of the layer within this scope that this clip should control.

Invert

Use (1.0 - value) as the weight.

LayerAnimSpeed clip

Controls the speed of an animation that is playing in the same scope as this procedural clip through code. The Blend value is not used.

LayerAnimSpeedParam

The name of the floating point parameter that stores the speed value (0 by default).

ScopeLayer

The layer index within the scope of the animation that you want to control.

Invert

Uses (1.0 – value) as the speed.

LayerManualUpdate clip

Controls the (normalized) time of an animation that is playing in the same scope as this procedural clip through code.

Param Name

The name of the floating point parameter that stores the normalized time value (0 by default).

Scope Layer

The layer index within the scope of the animation that you want to control.

Invert

Uses (1.0 – value) as the normalized time.

LayerWeight clip

Controls the weight of an animation layer through code.

Layer Weight Param

The name of the floating point parameter that stores the weight to apply to the layer

Scope Layer

The layer index within the scope of the layer that you want to control.

Invert

Uses (1.0 – value) as the normalized time.

LookPose clip

Low-level clip to start an LookPose asset. Uses the LookTarget parameter as the target, if it exists. If not specified, the target is 10m in front of the entity.

Animation

The Lookpose asset.

Blend

The fade-in duration.

Blend Time

The smoothing time for the spherical coordinates. Higher numbers mean the longitude and latitude have faster smooth movement toward the target.

Scope Layer

The layer to play the Lookpose on, relative to the scope's first animation layer.

Note

This works differently than the layer parameter inside the AimPose procedural clip, which is the actual layer number (0–16).

ManualUpdateList clip

Controls the normalized time of animations playing in multiple layers through code.

Param Name

The name of the parameter of type SWeightData (four floating-point weights), where the parameter stores the segment normalized time values for the layers.

Scope Layer

The layer index within the scope of the first layer that contains animation that you want to control. All layers after that within this scope are also controlled (up to four layers).

Invert

Use (1.0 – value) as the weight.

ParticleEffect clip

Plays a particle effect.

Effect Name

Name of the particle effect to spawn.

Joint Name

Optional joint to attach the emitter to.

Attachment Name

Optional attachment interface name to attach the emitter to

Position Offset, Rotation Offset

Local-space offset of the emitter. If Joint Name or Attachment Name is given, the offset is relative to the host entity.

Clone Attachment

If Attachment Name is given, create a copy of the given interface instead of using it directly. This allows for more than one effect to play on the same attachment. Disabled by default.

Kill on Exit

Explicitly remove all spawned particles instead of letting them die out on their own. Disabled by default.

Keep Emitter Active

Keep emitter alive after the procedural clip has ended. Disabled by default.

Note

Use with care - if the particle effect goes away on its own, there is no other way to get rid of the effect after it started.

PositionAdjust clip

Procedurally moves the entity towards a target position over time. The target position is taken from the TargetPos parameter, which must be set for the clip to play. Used to align characters to ledges.

Blend

Duration of the adjustment.

Offset, Yaw

Additional offset on top of the target position.

Ignore Rotation

Checks to ignore rotation.

Ignore Position

Checks to ignore position.

PositionAdjustAnimPos clip

Moves the entity from the source position (its origin in the DCC tool) of the animation to the target position. If the animation contains movement, this clip might not behave as expected as the delta is only calculated at the start of the animation. In this case, use the PositionAdjustAnimPosContinuously clip instead. The target position is taken from the Param Name parameter.

Blend

Duration of the adjustment.

Param Name

(Optional) Name of the parameter to use. If not specified, uses the TargetPos parameter.

Ignore Rotation

Check to ignore rotation.

Ignore Position

Check to ignore position.

PositionAdjustAnimPosContinuously clip

Moves the entity from the source position (its origin in the DCC tool) of the animation to the target position. The target position is taken from the TargetPos parameter, which must be set for the clip to play.

Blend

Duration of the adjustment.

PositionAdjustTargetLocator clip

Takes the character assigned to the specified scope, typically a dependent scope, and moves the entity towards the location of a specific joint of this character.

Blend

Duration of the adjustment.

Target Joint Name

Name of the joint to align to.

Target Scope Name

The scope that has the dependent character attached that you want to align to.

Target State Name

Not used.

SetParam clip

Sets a float parameter to a certain value.

Param Name

The name of the parameter.

Blend

The time it takes to reach the target value.

Target

The target value.

Exit Target

The value to go to after the clip ends.

WeightedList clip

Controls the weight of consecutive layers through code.

Param Name

The name of the parameter of type SWeightData (four floating-point weights), which stores the weights for the layers.

Scope Layer

The layer index within the scope of the first layer that you want to control. All layers after that within this scope are also controlled (up to four layers).

Invert

Uses (1.0 – value) as the speed.

Game Procedural Clips

The following are classified as GameDLL procedural clips.

Aiming clip

Requests that the Aimpose be enabled.

Blend

Fade-in duration for the Aimpose.

AimSmoothing clip

Relies on Aimpose or Aiming scope setup. Controls smoothing parameters for the polar coordinates while moving toward or following a target.

Smooth Time Seconds

The "smoothing time" for the spherical coordinates. Higher numbers mean the longitude or latitude have faster smooth movement towards the target.

Max Yaw Degrees Per Second

Maximum degrees per second in the yaw direction.

Max Pitch Degrees Per Second

Maximum degrees per second in the pitch direction.

AttachPnt clip

Attaches the pick-and-throw weapon.

Attachment Point

Name of the attachment interface to use.

ColliderMode clip

Overrides the ColliderMode for the character.

Valid values:
  • Undefined (give up control)

  • Disabled (no collisions)

  • GroundedOnly

  • Pushable

  • NonPushable

  • PushesPlayersOnly

  • Spectator

CompromiseCover clip

Tells the AI system that cover has been compromised.

CopyNormalizedTime clip

Synchronizes animation within two layers by automatically copying over the segment normalized time from an animation in one layer to an animation in another layer.

Source Scope

The scope from which to copy.

Source Layer

The layer within the source scope to look for the source animation.

Layer

The layer within the current scope that contains the animation that you want to synchronize

FacialSequence clip

Plays a facial sequence.

Filename

The facial animation sequence .fsq file to play

Continue After Exit

Whether to continue playing the sequence after the clip ends. Ignored when looping the sequence, in which case the default behavior is used, so the sequence stops playing when the clip ends.

Looping

Whether to loop the sequence.

Looking clip

Relies on Lookpose or Looking scope setup. Requests the Lookpose to be enabled. Blend-in time is used as fade-in time for the Lookpose.

Blend

Fade-in duration for the Lookpose.

MovementControlMethod clip

Override the movement control method of the character.

Horizontal

Horizontal movement control method. Valid values:

  • 0: Undefined (no override)

  • 1: Entity driven

  • 2: Animation-driven

  • 3: Animation-driven with collision in the horizontal plane

Vertical

Vertical movement control method. Valid values:

  • 0: Undefined (no override)

  • 1: Entity-driven

  • 2: Animation-driven

Ragdoll clip

Makes a character turn into a ragdoll and optionally blend back to animation.

Blend

Defines the time range during which the character starts randomizing.

Sleep

When set to 0, the AI exhibits ragdoll behavior. When set to 1, the AI stays alive during the ragdoll phase and blends back to animation.

Stiffness

Determines how much the ragdoll behavior follows the animation.

Note

The Sleep parameter is only used by the blend-from-ragdoll game code, which is triggered by calling CActor::Fall().

This triggers the CAnimActionBlendFromRagdollSleep, which makes the character exhibit ragdoll behavior: It plays the fragment with fragmentID BlendRagdoll and tags containing standup+blendin+ragdoll. This fragment has to contain a Ragdoll clip with the sleep value set to 1.

For standing up, a CAnimActionBlendFromRagdoll is started after the ragdoll phase has ended. This action relies on all possible standup animations to be an option for the fragmentID BlendRagdoll and tags containing standup+blendout. The best matching animation is chosen based upon the first frame of these.

SetStance clip

Tells an AI character it is in a certain stance. It does not trigger stance-change animation. This is useful to annotate an animation that ends up in a stance other than it started in, such as in a scripted sequence that can be interrupted. When the sequence is interrupted, the game knows the AI is in another stance.

Stance

Stance name. Valid values:

  • Null

  • Stand

  • Crouch

  • Prone

  • Relaxed

  • Stealth

  • Alerted

  • LowCover

  • HighCover

  • Swim

  • Zero-G

SwapHand clip

Temporarily move an attachment from the right hand to the left. This is hardcoded to use the attachment names weapon and left_weapon.

TurretAimPose clip

Controls aiming and aimpose of the turret entity.

Blend

The fade in time of the Aimpose.

Animation

The Aimpose asset to use.

Blend Time

Unused.

HorizontalAimSmoothTime

The smoothing time for the yaw direction.

VerticalAimSmoothtime

The smoothing time for the pitch direction.

Max Yaw Degrees Per Second

Maximum degrees per second that the turret rotates in the yaw direction.

Max Pitch Degrees Per Second

Maximum degrees per second that the turret rotates in the pitch direction.

WeaponBump clip

First-person weapon bump animation that occurs when the player lands.

Time

The amount of time that the bump animation plays.

Shift

How much the weapon moves on screen after the player lands.

Rotation

How much the weapon rotates.

WeaponPose clip

Places the weapon on a specific location on the screen. It has three modes: right hand, left hand, and zoom. Only one of these modes can be active at a time; however, more than one clip can run in parallel.

Pose Type

The default is 0, which means right hand. This changes the weapon's position on screen starting from the idle pose position. A value of 1 means zoom, which places the weapon on the screen when the player decides to zoom in. A value of 2 means left hand, which can be used to modify the original base pose to accommodate underbarrel attachments.

Zoom Transition Angle

The default is 0, which defines the angle that the weapon rotates during a zoom transition. Zoom Transition Angle is only read if Pose Type is set to 1 (zoom). Otherwise this parameter is totally ignored.

Position, Rotation

Defines the pose itself as an offset to the base pose. Rotation is defined in angles.

WeaponRecoil clip

Activates the recoil behavior on the weapon. It triggers a recoil animation every time the weapon fires.

Damp Strength

How quickly the weapon comes back to rest pose after a kick.

Fire Recoil Time

Attack time of the recoil kick. A value of 0 applies the kick in a single frame, which is not recommended, since it can make the animation look jerky.

Fire Recoil Strength First, Fire Recoil Strength

The kick strength. Fire Recoil Strength First has the same behavior as Fire Recoil Strength but is applied to the first shot only. For best results in rapid fire modes, make Fire Recoil Strength First much higher than Fire Recoil Strength.

Angle Recoil Strength

The degree of deviation the weapon experiences after each shot.

Randomness

The overall organic feeling of the recoil animation.

WeaponSway clip

This clip activates the laziness effect on the player's moving hands. Careful setup of the clip simulates different weight feelings for different weapons. After the clip is activated, it starts reading the player movement and computes weapon offsets in real time.

Ease Factor Inc, Ease Factor Dec

How much it takes for the look poses to blend in (Inc) or out (Dec) when player looks around

Velocity Interpolation Multiplier

Fine tune control for strafing.

Velocity Low Pass Filter

The filter applied to the player movement to make the sway more reactive or intensive.

Acceleration Smoothing

Helps make strafe poses less linear and more realistic.

Acceleration Front Augmentation

The degree to which it makes more sense for the strafe poses to move back and forth as opposed to left and right.

Vertical Velocity Scale

Changes the look poses behavior when player is going up or down a ramp.

Sprint Camera Animation

Do not use.

Look Offset

The degree to which the weapon moves around the screen while player looks around.

Horiz Look Rot

The rotation applied to the weapon when the player looks left and right.

Vert Look Rot

The rotation applied to the weapon when player looks up and down.

Strafe Offset

The degree to which the weapon moves when player moves around.

Side Strafe Offset

The rotation of the weapon when the player starts strafing either to the left or to the right.

Front Strafe Rot

The rotation of the weapon when the player starts moving forward or backward.

WeaponWiggle clip

Activates weapon wiggling and shaking.

frequency

Shake frequency.

intensity

Shake intensity.