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
| Field | Value |
|---|---|
| Kind | action |
| Environment | B2 - Simulation |
| Category | actions |
| Extends | FB2Action_Base |
| Require | require('Actions.B2Action_PickUp') |
Properties (9)
| Name | Type | Description |
|---|---|---|
AnimMontageName | string | Resolved montage asset name used to play/track the pick-up animation |
CarryHandStyle | EB1CarryHandStyle | Carry style (one-hand/two-hand/assist-control) of the object being picked up, drives animation selection and hand attachment |
CurrentAnimTime | number | Elapsed time of pick-up anim montage playback (reset to 0 on OnPlay) |
GrabId | string | Grab table row id resolved from Action.S1, the target object, or notify scripts; identifies how the object is carried |
GrabLoopAnimId | string | Looping carry animation id (from the grab table's LoopAnimId, hand-converted) applied once the object is attached |
PickUpAnimId | string | Resolved pick-up montage animation id used to play the grab motion |
SelectedHand | EB1HandType | Hand chosen to carry the picked-up object, determined by hand availability, crafting state, and baby-in-hand rules |
TotalPlayLength | number | Total play length of pick-up anim montage (from montage table row) |
bUseLeftHand | boolean | Whether to prefer the left hand when both hands are free, set externally via SetUseLeftHand |
Functions (6)
| Function | Parameters | Returns | Description |
|---|---|---|---|
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. |
SetUseLeftHand | bInPreferLeftHand: boolean | - | Sets Use Left Hand. |
Override points (5)
Implement these in Lua as FB2Action_PickUp.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) |