Files
UE5-Modular-Game-Framework/docs/blueprints/04-inventory/26_BPC_ActiveItemSystem.md
Lefteris Notas 411edea8ce add blueprints
2026-05-19 13:22:27 +03:00

2.8 KiB
Raw Blame History

BPC_ActiveItemSystem — Active Item System

Parent Class: ActorComponent Category: Inventory Target UE Version: 5.55.7 Build Phase: 3 — Inventory


1. Overview

BPC_ActiveItemSystem manages the player's currently selected/active item and quick slot assignments. It reads from BPC_InventorySystem and maps up to 8 quick slots to inventory items, handling hotkey input, item switching, and active item context (usable, throwable, consumable).


2. Enums

E_QuickSlot

Value Description
Slot_1 Hotkey 1
Slot_2 Hotkey 2
Slot_3 Hotkey 3
Slot_4 Hotkey 4
Slot_5 Hotkey 5
Slot_6 Hotkey 6
Slot_7 Hotkey 7
Slot_8 Hotkey 8

3. Variables

Variable Type Description
QuickSlots TMap<E_QuickSlot, FGuid> Hotkey → Inventory Item ID mapping
ActiveSlot E_QuickSlot Currently selected quick slot
ActiveItem S_InventoryEntry Currently active item data
bHasActiveItem bool An item is currently selected
bCanSwitchItems bool Item switching allowed (not during anim)
SwitchCooldown float Min time between item switches

4. Functions

Function Description
SetQuickSlot Assigns an inventory item to a quick slot
ClearQuickSlot Clears a quick slot assignment
SelectSlot Sets the active quick slot by key press
GetActiveItem Returns current S_InventoryEntry
UseActiveItem Uses/consumes the active item
CycleNextItem Selects the next populated quick slot
CyclePreviousItem Selects the previous populated quick slot
IsQuickSlotEmpty Returns true if quick slot has no item
GetQuickSlotItem Returns item in a specific quick slot

5. Event Dispatchers

Dispatcher Payload Description
OnActiveItemChanged S_InventoryEntry NewItem, E_QuickSlot Slot Active item switched
OnQuickSlotAssigned E_QuickSlot Slot, FGuid ItemID Item assigned to quick slot
OnQuickSlotCleared E_QuickSlot Slot Quick slot cleared
OnActiveItemUsed S_InventoryEntry Item Active item consumed

6. Dependencies & Communication

System Relationship
BPC_InventorySystem Reads inventory slots; source of truth for items
BPC_EquipmentSlotSystem Automatically updates quick slots on equipment change
WBP_HUDController Displays active item in HUD
BPC_HealthSystem Consumed health items trigger healing

7. Reuse Notes

  • Quick slots are configurable per project (4-8 slots)
  • Active item system is the bridge between inventory data and gameplay input