FB2Action_ChangePosture
Overview
- ChangePosture 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_ChangePosture') |
Properties (15)
| Name | Type | Description |
|---|---|---|
ChangePostureState | FB1PostureState | Resolved posture state (id, direction, target entity, slot) to apply on finish |
CurrentAnimTime | number | Elapsed time since the posture animation started playing |
OwnerCharacter | any | Cached reference to the character performing the posture change |
PostureAnimId | string | Animation id resolved for the target posture animation |
PostureAnimName | string | Montage row name resolved for the target posture animation |
PostureId | string | Target posture id to transition into, read from the action params |
SafeExitLocation | FVector | Precomputed safe location to teleport the character to when exiting a vehicle |
TargetEntity | any | Cached reference to the interaction target actor for the posture change |
TransitionAnimId | string | Animation id for transitioning between the current and target posture, if any |
TransitionAnimName | string | Montage row name resolved for the transition animation |
bIsCancelCondition | boolean | Whether this action currently allows cancellation (set when a blocking vehicle-exit condition occurs) |
bIsDriverExit | boolean | Whether this posture change corresponds to the vehicle driver exiting |
bIsOverrideAnim | boolean | Whether a one-time posture override animation is being used instead of the normally resolved one |
bIsPassengerExit | boolean | Whether this posture change corresponds to a vehicle passenger exiting |
bUseSafeExitLocation | boolean | Whether to teleport the character to SafeExitLocation on finish |
Functions (5)
| Function | Parameters | Returns | Description |
|---|---|---|---|
GetPostureId | - | string | Returns Posture Id. |
OnCanceled | - | - | Callback invoked on Canceled. |
OnFinish | - | - | Callback invoked on Finish. |
OnPlay | - | - | Callback invoked on Play. |
OnTick | DeltaTime: number, CurrentTime: FDateTime, GameDeltaMinutes: number | - | Callback invoked on Tick. |
Override points (4)
Implement these in Lua as FB2Action_ChangePosture.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_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) |