FB2Action_PlayAnim
Overview
- PlayAnim action. Override the OnPlay/OnFinish/OnPaused/OnCanceled/OnTick timing hooks in Lua.
Metadata
| Field | Value |
|---|---|
| Kind | action |
| Environment | B2 - Simulation |
| Category | actions |
| Extends | FB2Action_Base |
| Require | require('Actions.B2Action_PlayAnim') |
Properties (16)
| Name | Type | Description |
|---|---|---|
AddOnAnimData | FB2AddOnAnimData | AddOnAnim Data |
AnimMontageName | string | Resolved montage asset name used to play/track the animation, set by SetAnim() |
AnimationId | string | Animation id to play, resolved via the overridable GetAnimationId() hook |
Entity | any | Entity that plays the animation (self or target, per Action.BaseObject); used to access its anim instance |
LoopCount | integer | Requested number of times to play the montage's Loop section (0 normalized to 1, -1 means infinite) |
LoopPlayLength | number | Play length of a single loop of the resolved montage, used in progress-time calculation |
Paused | boolean | Whether the montage is currently held in a paused blend state |
Phase | EB2PlayAnimPhase | Phase of PlayAnim Action |
PlayingComponentName | string | Anim component the montage is played on (e.g. Root vs. other), resolved by SetAnim(). SetAnim() clears this on entry, so it stays None whenever the resolve fails; a non-None value means the latest resolve succeeded. |
RateScale | number | Playback rate scale of the resolved montage, used in progress-time calculation |
RemainLoopCount | integer | Remaining loop iterations, decremented each time the Loop section finishes; drives when looping stops |
RequiredPostureId | string | For SafeMove. Need Not to Save |
SectionName | string | Current montage section of MAIN ANIMATION (Default/Loop/End), tracked via montage delegates and used to drive finish/cancel decisions |
StartLocation | FVector | Referenced in GetLogString() for debug logging, but never assigned by this class or any subclass - the log always shows the zero-vector default |
StartRotation | FRotator | Referenced in GetLogString() for debug logging, but never assigned by this class or any subclass - the log always shows the zero-rotator default |
TotalPlayLength | number | Total play length of the resolved montage, used in progress-time and one-loop-length calculations |
Functions (8)
| Function | Parameters | Returns | Description |
|---|---|---|---|
GetActionOneLoopPlayLength | - | number | Returns Action One Loop Play Length. |
GetPlayingComponentName | - | string | Returns Playing Component Name. |
IsNeedAutoInsertWalkAction | - | boolean | Returns whether Need Auto Insert Walk Action. |
OnCanceled | - | - | Callback invoked on Canceled. |
OnFinish | - | - | Callback invoked on Finish. |
OnPaused | - | - | Callback invoked on Paused. |
OnPlay | - | - | Callback invoked on Play. |
OnTick | DeltaTime: number, CurrentTime: FDateTime, GameDeltaMinutes: number | - | Callback invoked on Tick. |
Override points (5)
Implement these in Lua as FB2Action_PlayAnim.Override_Name = function(...) end.
| Function | Parameters | Returns | Description |
|---|---|---|---|
Override_OnCanceled | - | - | Timing hook called when the action is canceled. |
Override_OnFinish | - | - | Timing hook called when the action finishes. |
Override_OnPaused | - | - | Timing hook called when the action is paused. |
Override_OnPlay | - | - | Timing hook called when the action starts (play). Override in Lua to replace the start behavior. |
Override_OnTick | DeltaTime: number, CurrentTime: FDateTime, GameDeltaMinutes: number | - | Timing hook called every tick while the action runs. (performance-sensitive) |