Dev log – Day 5
Summary
Today was focused on pushing core gameplay systems forward: expanding the inventory system with query + unique-item handling, building a working pickup flow, and adding “use item” logic so doors can require (and optionally consume) a key item. On the UI side, I implemented a basic HUD notification widget to replace print strings for look-at and pickup feedback. Finally, I created a place-item “podium” trigger that lets the player place an inventory item into the world (starting with a Fuse use-case), with LookAt feedback that changes based on whether the required item is currently in the inventory.
What I Worked on Today
Inventory System
Intent
Implement and validate an inventory query function that checks if a given item exists and returns the in-stock quantity.
Accomplished
- Added inputs to the Query Inventory function (Item:
DA_Itemobject reference, Quantity: integer). - Implemented Map Find lookup (Content as the target map, Item as the key).
- Added a branch to verify whether Find returned a valid result.
- Returned
true+ in-stock quantity when the item is found. - Returned
false+ stock quantity when the item is not found.

Build Item Pickup system
Intent
Implement a pickup flow that adds items to the inventory (with unique-item rules) and optionally destroys the pickup actor after a successful add.
Accomplished
- Added an
IsUniqueboolean toDA_Item(default: false) to support unique item behavior. - Updated
AddToInventoryto query inventory first and prevent adding duplicates when an item is both in stock and unique. - Implemented adding pickup items to the inventory via
BP_PickUpby retrieving the player’sAC_InventorySystemcomponent and callingAddToInventorywith the item DataAsset. - Promoted pickup
Quantityto a variable to improve reuse/clarity of the pickup logic. - Added an
IsDestroyedOnPickupboolean toDA_Item, plus getter access, to control whether the pickup actor should be destroyed after being collected. - Implemented “destroy after successful pickup” using an AND check:
AddToInventory returned trueANDIsDestroyedOnPickup == true→ then destroy the pickup actor. - Playtested pickup flow in-level and confirmed pressing E behaves as intended after setting
IsDestroyedOnPickupcorrectly (set to true on Keycard and Fuse, and true by default inDA_Item).



Add using item functions
Intent
Enable interactables (e.g., doors) to require an inventory item to unlock/open, with optional key consumption.
Accomplished
- Added
RequiredKey(DA_Item object reference) toBP_Doorand made it instance-editable. - Switched door interaction from overlap events to
Event InteractWith→Open Door; playtest confirmed it opens on interact. - Added unlock logic for doors when a required key is present (keycard use-case).
- Added functionality to destroy/consume the key when unlocked.
Implementation Notes
- If
RequiredKeyis NOT valid:- After trigger logic: unlock door.
- On interact: open door.




Modify BP_Door
Intent
Show appropriate LookAt text when the player looks at a locked door.
Accomplished
- Modified the Return node to say “Locked door” when looking at a locked door.

Add category feature to the inventory system
Intent
Add an item category field so inventory items can be grouped/handled by type.
Accomplished
- Created an enumeration blueprint for item categories (
E_ItemCategory). - Added category entries: Key, Utility, Notes.
- Added a
Categoryvariable toDA_Item(enum-based catalogue type). - Assigned category values on items (e.g., fuse → Utility, keycard → Key).
Implementation Notes
- Created
E_ItemCategoryin theInventorySystem/Datafolder. - Added
Categoryvar toDA_Item(type: enum catalogue).


Implementing Basic HUD system
Intent
Display interaction/look-at feedback and inventory pickup notifications through a basic on-screen HUD widget.
Accomplished
- Added a
W_Notificationswidget inContent/Game/UserInterface. - Built the widget layout: Canvas Panel → Border (anchored center-right) → Text (
TXT_Notice). - Implemented notice binding:
Notice(Text) variable, instance editable + expose on spawn.Pre ConstructsetsTXT_NoticefromNotice.
- Added auto-clear behavior: timer after
ConstructcallsClear notice, whichRemove from parent. - Hooked inventory → HUD:
- In
AC_InventorySystem“Add to inventory” creates the widget before return. - Formats notice text as “ added to inventory”.
- Adds to viewport.
- In
- Playtested pickup flow: keycard/fuse pickup shows correct HUD notice (performed as expected).



Add place item trigger function
Intent
Enable placing a specific inventory item onto a world “podium” trigger (e.g. a fuse) so it can drive puzzle/door logic.
Accomplished
- Created the blueprint and implemented basic functionality.
- Implemented LookAt.
- Implemented InteractWith.
- Implemented adding the item static mesh to the podium.
- Playtested.
- Updated LookAt to better reflect absence of the needed item.
Implementation Notes
- Created a child of
BP_TriggernameddBP_ItemPodium. - Added a basic cube mesh for development (podium mesh will be adjusted later).
- Added a static mesh slot that gets filled by the placed item.
- Added
Itemvariable (DA_Item reference), instance-editable. - Confirmed cube blocks the interact channel; implemented
BPI_Interact. - Implemented LookAt: verb “Place”, noun is the item name.
- Implemented InteractWith:
- Query inventory for
Item(qty 1). - If present, remove from inventory (qty 1).
- Query inventory for
- Adding static mesh to podium:
- Set podium mesh from the Item’s stored mesh.
- Call
OnTriggeredand set triggered true.
- Added inventory query in the “T” function to change LookAt based on availability:
- If item in stock → “Place item”
- If not in stock → “Needs Item”
- Playtest setup:
- Door locked, trigger = Podium, required key empty; Podium item = Fuse
- Expected: door cannot open until fuse is picked up and placed on podium
- Result: success




Technical Notes
- Inventory querying is now a reusable foundation:
Query Inventoryreturns both a boolean (found/not found) and in-stock quantity via Map Find + validation branch. - Pickup flow depends on
DA_Itemconfiguration:IsUniquecontrols duplicate prevention.IsDestroyedOnPickupcontrols whether the pickup actor is destroyed after a successful add (and was the root cause of an “E doesn’t pick up” issue until set correctly).
- Door interaction was moved from overlap to explicit interaction (
Event InteractWith), improving control over when doors open. - The HUD notification widget is now the primary feedback path for pickups/look-at messaging, with an auto-clear timer to avoid persistent UI clutter.
Challenges & Lessons Learned
- Pickup interaction initially failed when pressing E; the likely blocker was
IsDestroyedOnPickupnot being set. Fixing the data (Keycard/Fuse set true, and defaulting true inDA_Item) resolved the issue and restored expected pickup behavior. - I attempted to set lock state from a trigger branch false output, but reverted because it would reset lock status when the trigger/button resets. This is something to revisit later for puzzle logic.
Next Steps
- Revisit door lock-state handling for trigger/button reset scenarios (for future puzzles).
- Replace/adjust the temporary podium cube mesh now that the place-item flow is proven.
- Continue expanding place-item use-cases (Fuse + Fuse Panel puzzle path) using the podium trigger foundation.

