fort_inventory_trap_component is the UEFN inventory for the Fortnite trap slot.
Verse using statement |
using { /Fortnite.com/Itemization } |
Inheritance Hierarchy
This class is derived from the following hierarchy, starting with component:
| Name | Description |
|---|---|
component |
Base class for authoring logic and data in the SceneGraph. Using components you can author re-usable building blocks of logic and data which can then be added to entities in the scene. Components are a very low level building block which can be used in many ways. For example:
As components are generic there is no specific way that they must be used. It is up to the needs of your experience if you use one big game component or if you break up logic into many small components. Classes deriving from component must also specify Only one instance of a component from each subclass group can be added to an entity at a time. For example, given this group of components, only one light_component can exist on a single entity. To create multiple lights you should use multiple entities. light_component := class ============================================================================== Component Lifetime Components move through a series of lifetime functions as they are added to entities, added to the scene, and begin running in the simulation. Components should override these methods to perform setup and run their simulation. As a component shuts down it will then move through shutdown version of these
functions, giving users the opportunity to clean up any retained state on the
component before it is disposed
.
Lifetime Methods:
OnAddedToScene
OnBeginSimulation -> OnSimulate |
inventory_component |
Inventory components hold items. An entity with an inventory component can be considered to have an inventory. The inventory component controls which items can enter or exit. They also determine whether an item can be equipped. |
fort_inventory_component |
|
Members
This class has both data members and functions.
Data
| Data Member Name | Type | Description |
|---|---|---|
AddItemEvent |
listenable(payload) |
|
Entity |
entity |
The parent entity of this component.
|
EquipItemEvent |
listenable(payload) |
|
RemoveItemEvent |
listenable(payload) |
|
TickEvents |
?tick_events |
Set callbacks to |
UnequipItemEvent |
listenable(payload) |
Functions
| Function Name | Description |
|---|---|
AddItem |
Adds the item to this inventory only, ignoring sub-inventories. Fails if no items could be added. |
AddItemDistribute |
Adds the item to this inventory, including sub-inventories. Fails if no items could be added. |
FindInventories |
Returns a list of all sub-inventories within this inventory and its descendant inventories. |
FindItems |
Returns a list of all items within this inventory and its descendant inventories. |
FindItems |
Returns a list of all items (of a specific type) within this inventory and its descendant inventories. |
GetEquippedItems |
|
GetInventories |
Returns a list of sub-inventories of this inventory only. |
GetItemInSlot |
Returns the item in the specified slot, if there is one. |
GetItems |
Returns a list of items within this inventory only. |
GetItems |
Returns a list of items (of a specific type) within this inventory only. |
GetMaxSlots |
Returns the total number of slots in this inventory. |
IsInScene |
Succeeds if the component is currently in the scene.
|
IsSimulating |
Succeeds if the component is currently simulating.
|
OnAddedToScene |
Called when the component is added to the scene by parenting it under the simulation entity or another entity already in the scene.
|
OnBeginSimulation |
Called when the component begins simulating within the scene.
|
OnEndSimulation |
Called when the component ends simulation within the scene.
|
OnRemovingFromScene |
Called when the component is about to be removed from the scene.
|
OnSimulate |
Called when the component begins simulating within the scene.
|
RemoveFromEntity |
Removes the component from the entity.
|
RemoveItem |
Removes an item from this inventory or its descendent inventories. Fails if the item could not be removed. |
SendDown |
Send a scene event to this component. Return true to consume the event and halt propogation. |