One Item at a Time: No Hotbar, No Inventory Screen
Documentation Unreal Engine Player Combat Inventory Tutorial
Make the player carry only the item in hand in Unreal Engine 5, as in a brawler or a survival game: a one-slot inventory with no hotbar or inventory screen, where a pickup goes to the hand and swaps the weapon held.
Start from the demo player,
BP_UPC_Character. The belt stays, cut to one hidden slot, since the belt brings each pickup to the hand. The slot holds one stack: a sword, or three potions, which a key uses and never holds. With a sword in it a shield pickup swaps (the sword goes down where the G drop key would put it, so it needs a World Item fragment; Build Your First Combo's Item_MySword has none, so add one or use the demo's Item_UPC_Sword); with potions in it a sword pickup reads No Room.Set it up
5 minutes- 1
Give the character room for one item
An item in hand is an inventory item, so the inventory's one slot holds it: onBP_UPC_Character, set InventoryComponent's Config toInventoryConfig_UPC_SingleItem.BP_UPC_Character▾UPC▾InventoryConfigInventoryConfig_UPC_SurvivalGrid▾The demo's single item config. - 2
Shrink the belt to one slot
OnBP_UPC_PlayerController's QuickBarComponent, set Slots to one entry with no Filter. The config's Belt Slots is empty, so this belt applies, and its ticked Auto Populate from Inventory and Auto Draw on Init bring each pickup to hand.Blocked Tags switches the belt off while the character carriesUPC.State.BeltBlocked. The demo's Freeflow style holds that tag in its Gameplay Tags fragment; keep it out of your style.DetailsQuickBarComponentUPC
Quick Bar
Slots1 Array elementIndex [ 0 ]FilterNoneBlocked Tags1 Gameplay TagUPC.State.BeltBlockedAuto Populate from InventoryAuto Draw on InitSlots cut to one entry with no Filter. Only the rows this recipe reads are shown. - 3
Hide the belt and the screen
InBP_UPC_PlayerController, delete the BPC_UPC_InventoryScreens component (the I key's screen) and the fourIA_UPC_SelectSlotevents (the slot keys). A character that carries potions keeps the first event, whose Press Slot call has Slot Index 0: that key uses the potion. InCombatStyle_UPC_OverShoulder, the starting style, removeUPC.UI.Show.Beltfrom the Gameplay Tags fragment to hide the HUD's belt. - 4
Press Play and swap weapons
At the weapon rack, press E on a sword: it comes to hand. On the shield the prompt reads Swap and names the sword; E trades them.
What the character carries
Details
InventoryConfig_UPC_SingleItem
Containers
Containers1 Array element
Containers
1 Array element
Index [ 0 ]
Index [ 0 ]
Container
UPC.Inventory.Container.Hand
Definition
Container_UPC_Hand
Held Items
Belt Space
Keeps Its Place
Equipped Space
Keeps Its Place
Has Belt
Belt Slots
0 Array elements
Swap When Full
One container, Container_UPC_Hand, holds what the character carries. The belt's item and the item in hand keep their slot (Belt Space and Equipped Space: Keeps Its Place), so a pickup with the hand full swaps: the item in hand goes down and the new one comes in.
Details
Container_UPC_Hand
Layout
Layout
Slots
Slot Count
1
Capacity Tag
None
One slot, holding one stack.
Starting Items: list one, which the belt draws as play begins. The inventory skips a second, with a warning.
When the hands are full
With Swap When Full on, a pickup or a rack's Take reads Swap and trades the item in hand for the new one; off, it reads No Room and does nothing (Pickups, Drops and Holders). G drops the item in hand, with no belt needed: its ability comes from
AbilitySet_UPC_Default.AdvancedHeld Items settings
Belt Space and Equipped Space are set to Keeps Its Place here. Frees Its Place lets the character hold one item and carry a second (Containers and Rules).
AdvancedWith no belt at all
With no belt (a style carrying
UPC.State.BeltBlocked, or a player controller with no UPC Quick Bar), the config still holds one item, but a pickup waits in the slot, put away, where it does not swap. To draw it, call the Equipment Manager's Request Equip Item from a key on the player's machine, with the item from the inventory's Get All Items and Place empty; once it is in hand, a swap works as above.More ways to leave parts out: Use Only Part of the Inventory.