Skip to main content

B2Action_ChangePosture

  • Description
    * ===============
    * Drives a character's posture transition (standing, sitting, vehicle, carried, etc.), including animation/transition selection and vehicle-exit safety checks.
    * ===============
    * Param:
    * S1: target posture id to transition to
    * S2: -
    * F1: -
    * F2: -
    * Note:
    * OnInit(): resolves the target posture state/slot info and requests async preload of the posture and transition animations.
    * OnPlay(): starts the posture change animation and performs vehicle-exit validation.
    * OnFinish(): applies the resolved posture state to the character, restores animation transforms, and handles vehicle exit notifications/teleports.
    * OnCanceled(): stops the in-progress posture animation and clears the pending posture id.
    * OnTick(): accumulates elapsed posture animation time.
PropertyTypeDescriptionMetadata
PostureIdFNameTarget posture id to transition into, read from the action params
ChangePostureStateFB1PostureStateResolved posture state (id, direction, target entity, slot) to apply on finish
PostureAnimNameFNameMontage row name resolved for the target posture animation
PostureAnimIdFNameAnimation id resolved for the target posture animation
TransitionAnimIdFNameAnimation id for transitioning between the current and target posture, if any
TransitionAnimNameFNameMontage row name resolved for the transition animation
CurrentAnimTimefloatElapsed time since the posture animation started playing
bIsOverrideAnimboolWhether a one-time posture override animation is being used instead of the normally resolved one
bIsCancelConditionboolWhether this action currently allows cancellation (set when a blocking vehicle-exit condition occurs)
bUseSafeExitLocationboolWhether to teleport the character to SafeExitLocation on finish
SafeExitLocationFVectorPrecomputed safe location to teleport the character to when exiting a vehicle
bIsDriverExitboolWhether this posture change corresponds to the vehicle driver exiting
bIsPassengerExitboolWhether this posture change corresponds to a vehicle passenger exiting
ActionIdFNameIdentifier of this action instance (used for interaction tracking and mission time accounting)
StateEB2ActionStateCurrent lifecycle state of this action
MergeTypeEB2ActionMergeTypeMerge type flags for this action (e.g. interaction merge, checked in Finish())
ResultEB2InteractionResultResult of this action once it stops playing (Finish/Failed/Canceled)
SelfEntityIdFB1EntityIdEntity id performing this action
TargetEntityIdFB1EntityIdEntity id targeted by this action
GrabEntityIdFB1EntityIdEntity id grabbed/carried by self entity for this action
NonTargetLocationFVectorLocation used for script/condition context when there is no target entity
ActionFB1ActionInfoAction table data (S1/S2/F1/F2, script id lists, etc.) driving this instance
TickCalcValuefloatAccumulated tick delta time since this action started ticking
CurrentNotifyIndexint32Index into Action.NotifyScriptIds for the next notify script to run
AsyncLoadAnimInfoTArrayAnimations to async-load for this action's start/notify/tick/finish/cancel scripts
AddActionTimeIntervalfloatInterval in seconds between OnTickAddActionExecuteTime() calls
AccumAddActionTimefloatElapsed time accumulator compared against AddActionTimeInterval
StartActionTickTimeint64Tick timestamp used to measure elapsed action execution time for mission tracking
ActionKeyFB2ActionKeyKey identifying this action's slot/queue within the interaction system
TimeTaskIdFB1TimeTaskIdId of the scheduled time task used for delayed Determine/Finish
IsForceCancelableboolWhether this action is force-cancelable, copied from Action.IsForceCancelable
IsFirstActionboolMarks the first action in an interaction sequence; set on actions[0] by FB2InteractionPlayer::LinkActions(), read by FB2ActionPlayer
bMultiFlagboolSet by looping actions (PlayAnim, BookRead, Eat, WaitTalkSequence) once a loop iteration completes; read/reset by FB2ActionPlayer to gate multi-interaction selection
TalkInstanceIdFB1TalkInstanceIdId of the talk instance this action is linked to, set externally by FB2InteractionPlayer::LinkActions()
TalkSubjectEntityIdFB1EntityIdEntity id of the talk subject linked to this action, set externally by FB2InteractionPlayer::LinkActions()/OnTalkSpaceParamChanged()
bIsWaitFinishEventboolCached copy of Action.IsWaitFinishAction taken at Init(); read directly by FB2ActionPlayer for sequencing (the IsWaitFinishAction() getter instead reads Action.IsWaitFinishAction live)
AutoInsertTypeEB2ActionAutoInsertTypeType of action that was auto-inserted before this one (e.g. WalkTo, ChangePosture)