Skip to main content

FB2Action_GrabInventoryObject

Overview

  • Action that grabs an object in the inventory.

Metadata

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

Properties (10)

NameTypeDescription
AnimMontageNamestringResolved anim montage name to play for the pick-up animation
CarryHandStyleEB1CarryHandStyleCarry style (one-hand/two-hand/assist) of the object being grabbed
GrabLoopAnimIdstringAnim id used for the looping grab-hold motion, converted for the selected hand
GrapDtIdstringFB1GrabTableRow row id resolved from the target object's ObjectTableRow (grab type/definition key, not an entity id)
InventoryEntityIdFB1EntityIdCached inventory-object entity id to grab; base class defaults to TargetEntityId, subclasses override GetInventoryEntityId() to resolve and cache their own selection here
InventoryObjectanyCarriable inventory object instance being grabbed
PickUpAnimIdstringAnim id used to play the pick-up motion, converted for the selected hand
PostureComponentanyPosture component of self character, used for hand/carry checks
SelectedHandEB1HandTypeHand chosen to hold the grabbed object
SelfCharacteranySelf character resolved for the grab flow

Functions (5)

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.

Override points (5)

Implement these in Lua as FB2Action_GrabInventoryObject.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)