Tuesday 5.7 | Save System
Implementing a simple saving system, that handles the state of objectives and killed enemies.
The objective manager loads state at Start and invokes the OnCompletion event if an objective has been completed before. This causes all the effects to play but fixing that is a job for another day. This script also gives the last item received from an objective back to the player at start.
I decided to go with a free add-on for the saving systems backbone to save some time. I grabbed the one that looked the easiest to implement. Documentation was good and it worked like a dictionary which made it feel familiar.
I also added a handy helper text box to the Game Manager.
- Interactable objective
- Interact button fixed gets reset when entering trigger
- Tip manager fixed
- Dictionary for timers of tip texts
- Fixed floating enemy with enabling heightmesh when baking nav mesh
- Fixed enemy movement bug (Speed not updating correctly)
- Save System | Using Quick Save by Clayton Industries
- Completed Objectives
- Loads state at Start and calls Complete() method if the objective has been completed before. This causes some problems with all the effects also playing but that's a job for another day.
- At start gives the player an object that was gotten from the last "Give Item" type objective.
- class PersistentObject
- class PersistentObjectState
- Loads state at start and disables the object if it has been destroyed
- Currently only holds if the object has been destroyed but other things can be easily added
- Can be used on pretty much anything. Only the OnDestroyed method has to be called.
- Helper text in GameManager
- "Reset Save" button on GameManager