Dev log – Day 6
Summary
Today was about delivering Puzzle A’s full keypad-lock loop end-to-end: a dedicated locker actor with persistent unlock state, a 3-digit keypad UI, and a clean submission path where the locker owns validation + state (not the widget). After wiring and testing the interaction flow, a couple of edge cases were found (post-unlock interaction + pickup reliability) and corrected, and the temporary UI scaffolding used during development was removed once the loop was validated.
What I Worked on Today
Level 1 – Puzzle A – Locker Combination (Fuse)
Intent
Implement the Level 1 locker keypad so entering code 314 unlocks the locker and enables the Fuse reward flow.

What Actually Happened CHUNK_STORAGE
The locker keypad puzzle was implemented incrementally, starting with a dedicated locker actor and persistent unlock state. A custom 3-digit keypad widget was created and wired so that all code validation and state changes are owned by the locker, not the UI. Interaction flow was tested to ensure correct submission, failure handling, and successful unlock behavior. During validation, edge cases around post-unlock interaction and pickup reliability were identified and corrected. Temporary UI scaffolding used during development was removed once the full loop was confirmed to work end-to-end.

Accomplished
- [STEP] Created BP_Locker_Keypad_L1A actor and placed it in Level 1 – Maintenance Room
- [STEP] Added unlock variables to BP_Locker_Keypad_L1A
- [STEP] Placed Fuse pickup in the locker and set actor hidden in game to true so it cannot be collected before unlock
- [STEP] Implemented interaction interface on BP_Locker_Keypad_L1A to allow player interaction
- [STEP] Created WBP_Keypad_3Digit widget with 0–9 input, Clear, and Enter for 3-digit code entry
- [STEP] Added SubmitCode(Code) entry point on BP_Locker_Keypad_L1A for keypad code submission
- [STEP] Updated WBP_Keypad_3Digit Enter to call OwnerLocker.SubmitCode(CurrentInput)
- [STEP] Updated BP_Locker_Keypad_L1A to spawn WBP_Keypad_3Digit on interact and pass itself as OwnerLocker
- [TEST] Verified keypad Enter submits a 3-digit code to BP_Locker_Keypad_L1A via SubmitCode
- [STEP] Implemented BP_Locker_Keypad_L1A SubmitCode branching to unlock on 314 and reveal the Fuse pickup
- [STEP] Closed keypad UI and restored game input/cursor after successful locker unlock
- [FIX] Blocked keypad interaction on BP_Locker_Keypad_L1A after the locker is unlocked
- [FIX] Changed BP_Locker_Keypad_L1A collision to use simple as complex to allow pickup of the Fuse
- [TEST] Verified Fuse pickup becomes available only after unlock and can be collected exactly once without duplication
- [FIX] Removed temporary keypad UI test harness and left keypad spawning only via locker interaction

Why This Matters
- Establishes a reusable keypad-lock interaction pattern for future puzzles and containers.
- Confirms a clean separation of responsibility between UI input and gameplay authority.
- Locks in a comment-driven workflow that remains traceable while producing readable dev logs.
Technical Notes
- Locker state is persisted via explicit unlock variables rather than relying on animation state.
- Fuse pickup visibility and collision are gated behind the unlock flow to prevent early or duplicate collection.
- UI ownership is explicitly passed from locker to keypad widget to keep submission logic localized.
- Collision mode required adjustment to ensure reliable pickup behavior once the locker opens.





Challenges & Lessons Learned
- Early testing revealed that leaving keypad interaction active after unlock could cause unintended re-entry, which was resolved by explicitly blocking interaction post-unlock.
- Pickup issues traced back to collision complexity rather than inventory logic, reinforcing the need to validate collision settings early when placing reward items inside interactable props.
Next Steps
- Begin implementation of the next Level 1 puzzle using the same comment-driven production workflow.
- Review Puzzle A in a full room playthrough to confirm pacing and clarity.
- Prepare the next production card for end-to-end traceability before implementation.

