Unlocking Progress: A Fix for Pickup State Persistence

 

While crafting the item manager class responsible for handling the state of pickup objects and ensuring the persistence of that state between levels and game sessions, a hurdle emerged. It was discovered that the save system couldn't access the item manager because the save system was being invoked before the manager was ready, leading to an access error.

 

Initially, the strategy was to assign the item manager outside the "begin play" function to allow sufficient time for the manager to construct. Unfortunately, this approach introduced additional issues and posed potential challenges in the future.

 

To avert this problem and mitigate the risk of future complications, I opted to refactor the item manager. Instead of assigning it directly, I modified it to notify the save system when it was ready. This adjustment ensured that the manager was valid before proceeding, enabling the game to seamlessly progress with the crucial functionality of saving pickup states within each level.



Author: Justin Bethea

Date: 11/16/23

Comments

Popular posts from this blog

Resolving the Flying AI Bug: Boundary Fix in Level One Environment

Paying attention to Details

Revamping the player's attacks