Skip to main content

B2Action_PickUp

  • Description
    * ===============
    * Picks up a target/grabbed object (or one spawned/selected via the interaction's notify scripts) into the
    * character's hand, choosing the carrying hand/style and playing the matching pick-up animation.
    * Examples: taking a served food item, pulling food out of a fridge, or picking up a freely selected object.
    * ===============
    * Param:
    * S1: GrabId, the FB1GrabTableRow id describing how the object is grabbed/carried
    * S2: Optional override anim id for the pick-up montage; falls back to the grab table's animation when invalid
    * F1: -
    * F2: -
    * Note:
    * OnInit(): Resolves GrabId/PickUpAnimId from the target object, notify scripts, or picked inventory entity; determines the carrying hand/style and queues the required animations for async load.
    * OnPlay(): Plays the pick-up animation montage.
    * OnFinish(): Clears the pick-up context and records the grabbed entity on the interaction component.
    * OnCanceled(): Clears the pick-up context and, if an object was already attached, records the grabbed entity on the interaction component.
    * OnTick(): Accumulates elapsed animation time.
PropertyTypeDescriptionMetadata
GrabIdFNameGrab table row id resolved from Action.S1, the target object, or notify scripts; identifies how the object is carried
PickUpAnimIdFNameResolved pick-up montage animation id used to play the grab motion
GrabLoopAnimIdFNameLooping carry animation id (from the grab table's LoopAnimId, hand-converted) applied once the object is attached
AnimMontageNameFNameResolved montage asset name used to play/track the pick-up animation
CurrentAnimTimefloatElapsed time of pick-up anim montage playback (reset to 0 on OnPlay)
TotalPlayLengthfloatTotal play length of pick-up anim montage (from montage table row)
SelectedHandEB1HandTypeHand chosen to carry the picked-up object, determined by hand availability, crafting state, and baby-in-hand rules
CarryHandStyleEB1CarryHandStyleCarry style (one-hand/two-hand/assist-control) of the object being picked up, drives animation selection and hand attachment
bUseLeftHandboolWhether to prefer the left hand when both hands are free, set externally via SetUseLeftHand
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)