Inventory Events
All Inventory Events, whether related to items or containers, are centralized in the Inventory Manager.
This means you do not need to manually track events on individual fragments, containers, or item instances. Instead, you can simply listen to the appropriate event delegate exposed by the manager.
The Inventory Manager provides two primary multicast delegates for reacting to inventory-related events:
Event | Signature |
|---|---|
|
|
|
|
Both delegates share a consistent structure:
Target Object: Either the Container or Item involved in the event.
EventTag: A Gameplay Tag that describes the event type.
Payload: A
FInstancedStructthat holds additional data related to the event (see Event Payloads).
Binding to Events
To listen for events, simply bind to the appropriate delegate in the Inventory Manager:
Image coming soon...
Add a dynamic binding to each delegate:
Make sure your handler functions match the delegate signatures:
Event Payloads
Each event's payload contains data relevant to that specific action. You can safely extract this payload by checking the event's tag and casting the FInstancedStruct to the appropriate Payload Struct type.
Image coming soon...
Event Reference
This section covers details for each event emitted by Containers and Items, including the correct Payload Struct and available attributes.
Container Events
All container event payloads are FInventoryContainerEventPayload or specific subtypes. The following events are broadcast by the Inventory Manager.
Additionally, the Container Instance exposes the HandleContainerEvent function that allows the instance to handle its own events, as those are triggered by the Inventory Manager.
Event And Payload | Payload Attributes |
|---|---|
| Container |
| Container |
Item Events
All item events are delivered with a payload derived from FInventoryItemEventPayload (via FInstancedStruct).
Events are emitted in two stages:
Item-scoped dispatch: The Inventory Manager calls
HandleItemEventon the item. The Item then forwards the event to each of its assigned fragments.Global broadcast: After the item-scoped dispatch, the manager emits the same event on its delegates
Native_OnItemEvent(C++) andOnItemEvent(Blueprint), for systems that observe all items (UI, analytics, etc.).
The following table lists all events and their respective payload types.
Event And Payload | Payload Attributes |
|---|---|
| Item |
| Item, Container, Previous Container, Position, Previous Position |
| Item, Pickup Actor |
| Item, Durability |
| Item, EquipmentStateTag |
| Item, Level |
| Item, Container, Previous Container, Position, Previous Position |
| Item, Container, Previous Container, Position, Previous Position |
| Item |
| Item, bIsRotated |
| Item, StackSize |