You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: The item that is currently in this equipment slot.
SlotName:
Type:FName
Description: A unique name for each equipment slot, ensuring distinctness and used for UI identification.
SlotGuid:
Type:FGuid
Description: A unique identifier for each equipment slot, ensuring distinctness.
AcceptedTags:
Type:FGameplayTagsContainer
Description: A list of tags that identify what kind of items can be placed in this slot. For instance, a "Head" slot might accept items with tags like "Helmet," "Hat," etc.
AcceptedCategories:
Type:TArray<UInventoryItemCategory*>
Description: Similarly, a list of categories that the equipment slot will accept. For instance, the same "Head" slot might accept categories like "Armor" or "Clothing."
Usage and Logic Integration:
Initialization:
When creating an FEquipmentItemSlot, you'd specify the accepted tags and categories to dictate what it can hold. The SlotGuid would ideally be generated upon creation to ensure uniqueness.
Checking If An Item Can Be Equipped:
When trying to equip an item into an FEquipmentItemSlot, you'd first check if the item's tags or category match with the AcceptedTags or AcceptedCategories of the equipment slot.
Storing an Item:
Once deemed appropriate, the item can be stored in the slot by filling out the ItemSlot property.
Querying:
If you need to look up an equipment slot (e.g., for a UI display), you can search for it by its unique SlotGuid.
Removing or Replacing an Item:
You can simply set a new item to the ItemSlot or clear it to remove the item. When replacing, you should also ensure that the item being replaced is either discarded, destroyed, or returned to the inventory, depending on the desired game behavior.
The text was updated successfully, but these errors were encountered:
FEquipmentItemSlot
Properties:
ItemSlot:
FInventoryItemSlot
SlotName:
FName
SlotGuid:
FGuid
AcceptedTags:
FGameplayTagsContainer
AcceptedCategories:
TArray<UInventoryItemCategory*>
Usage and Logic Integration:
Initialization:
FEquipmentItemSlot
, you'd specify the accepted tags and categories to dictate what it can hold. TheSlotGuid
would ideally be generated upon creation to ensure uniqueness.Checking If An Item Can Be Equipped:
FEquipmentItemSlot
, you'd first check if the item's tags or category match with theAcceptedTags
orAcceptedCategories
of the equipment slot.Storing an Item:
ItemSlot
property.Querying:
SlotGuid
.Removing or Replacing an Item:
ItemSlot
or clear it to remove the item. When replacing, you should also ensure that the item being replaced is either discarded, destroyed, or returned to the inventory, depending on the desired game behavior.The text was updated successfully, but these errors were encountered: