Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Items can only be equipped in compatible slots:
// In ItemDataAsset Equipment Slot Tag: Equipment.Slot.MainHand Compatible Slot Tags: [Equipment.Slot.MainHand, Equipment.Slot.OffHand]
bool bCanEquip = EquipmentComponent->CanEquipItemInSlot(ItemInstance, SlotIndex); if (!bCanEquip) { ShowNotification("Cannot equip this item here"); }
TArray<int32> ValidSlots = EquipmentComponent->FindValidSlotsForItem(ItemInstance); if (ValidSlots.Num() == 0) { ShowNotification("No valid equipment slots for this item"); } else { // Equip to first valid slot EquipmentComponent->EquipItemToSlot(ItemInstance, ValidSlots[0]); }
int32 SlotIndex = EquipmentComponent->FindSlotIndexByTag( FGameplayTag::RequestGameplayTag("Equipment.Slot.Head") );
Equipment Type Tag: Equipment.Type.TwoHanded Equipment Slot Tag: Equipment.Slot.MainHand Compatible Slot Tags: [Equipment.Slot.MainHand]
Event On Item Equipped ↓ [Is Equipment Type TwoHanded?] Yes → [Unequip OffHand Slot] No → Continue