FB2Action_GrabInventoryObject
Overview
- Action that grabs an object in the inventory.
Metadata
| Field | Value |
|---|---|
| Kind | action |
| Environment | B2 - Simulation |
| Category | actions |
| Extends | FB2Action_Base |
| Require | require('Actions.B2Action_GrabInventoryObject') |
Properties (10)
| Name | Type | Description |
|---|---|---|
AnimMontageName | string | Resolved anim montage name to play for the pick-up animation |
CarryHandStyle | EB1CarryHandStyle | Carry style (one-hand/two-hand/assist) of the object being grabbed |
GrabLoopAnimId | string | Anim id used for the looping grab-hold motion, converted for the selected hand |
GrapDtId | string | FB1GrabTableRow row id resolved from the target object's ObjectTableRow (grab type/definition key, not an entity id) |
InventoryEntityId | FB1EntityId | Cached inventory-object entity id to grab; base class defaults to TargetEntityId, subclasses override GetInventoryEntityId() to resolve and cache their own selection here |
InventoryObject | any | Carriable inventory object instance being grabbed |
PickUpAnimId | string | Anim id used to play the pick-up motion, converted for the selected hand |
PostureComponent | any | Posture component of self character, used for hand/carry checks |
SelectedHand | EB1HandType | Hand chosen to hold the grabbed object |
SelfCharacter | any | Self character resolved for the grab flow |
Functions (5)
| 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. |
Override points (5)
Implement these in Lua as FB2Action_GrabInventoryObject.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) |