Move a Hotbar Slot
BlueprintSwap with Inventory (C++ Example)
Take Item At(InventoryComponent)Get Item At Index(HotbarComponent)Assign Item To SlotAdd Item Instance
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Blueprint does the same thing using:
Move Hotbar Slot
From Index = A
To Index = B
HotbarComponent->MoveHotbarSlot(FromIndex, ToIndex);
// Take one item from inventory
FItemInstance InvItem = InventoryComponent->TakeItemAt(InventorySlotIndex, 1);
// Get current hotbar item
FItemInstance HotbarItem = HotbarComponent->GetItemAtIndex(HotbarSlotIndex);
// Assign inventory item to hotbar
HotbarComponent->AssignItemToSlot(InvItem, HotbarSlotIndex);
// Put old hotbar item back in inventory
if (!HotbarItem.IsEmpty())
{
InventoryComponent->AddItemInstance(HotbarItem);
}
Take Item At (InventoryComponent)Get Item At Index (HotbarComponent)Assign Item To SlotAdd Item Instance