Skip to main content

FB2Action_PickUp

Overview

  • Pick-up action. Used in various contexts such as PreparedBakery_TakeServedHand (taking a piece), FridgeEatFood_Soup (taking food from the fridge), and PickUp_RightHand (picking up a selected object). Self plays the PickUp command; S1 is the GrabId and S2 the AnimId, with Notify script Ids driving the actual attach/spawn, and TargetEntityId being the source object (fridge, served food, selected object, etc.).

Metadata

FieldValue
Kindaction
EnvironmentB2 - Simulation
Categoryactions
ExtendsFB2Action_Base
Requirerequire('Actions.B2Action_PickUp')

Properties (9)

NameTypeDescription
AnimMontageNamestringResolved montage asset name used to play/track the pick-up animation
CarryHandStyleEB1CarryHandStyleCarry style (one-hand/two-hand/assist-control) of the object being picked up, drives animation selection and hand attachment
CurrentAnimTimenumberElapsed time of pick-up anim montage playback (reset to 0 on OnPlay)
GrabIdstringGrab table row id resolved from Action.S1, the target object, or notify scripts; identifies how the object is carried
GrabLoopAnimIdstringLooping carry animation id (from the grab table's LoopAnimId, hand-converted) applied once the object is attached
PickUpAnimIdstringResolved pick-up montage animation id used to play the grab motion
SelectedHandEB1HandTypeHand chosen to carry the picked-up object, determined by hand availability, crafting state, and baby-in-hand rules
TotalPlayLengthnumberTotal play length of pick-up anim montage (from montage table row)
bUseLeftHandbooleanWhether to prefer the left hand when both hands are free, set externally via SetUseLeftHand

Functions (6)

FunctionParametersReturnsDescription
OnCanceled--Callback invoked on Canceled.
OnFinish--Callback invoked on Finish.
OnPaused--Callback invoked on Paused.
OnPlay--Callback invoked on Play.
OnTickDeltaTime: number, CurrentTime: FDateTime, GameDeltaMinutes: number-Callback invoked on Tick.
SetUseLeftHandbInPreferLeftHand: boolean-Sets Use Left Hand.

Override points (5)

Implement these in Lua as FB2Action_PickUp.Override_Name = function(...) end.

FunctionParametersReturnsDescription
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_OnTickDeltaTime: number, CurrentTime: FDateTime, GameDeltaMinutes: number-Timing hook called every tick while the action runs. (performance-sensitive)