States have broken but I cannot figure out when or why

I was testing the saving of weapon choice and I noticed that my save and load states seem to be broken. If a character is dead and I press “L” they remain dead but return to the correct position based on the save state. If I then unplay and replay the scene, everything returns to the save position but nothing is dead again (as expected). I have no idea when this happened and I have looked through a lot of the code to compare it to Sam’s and I can’t figure it out.

EDIT: I have gone through a few old commits and realised it was always doing this and somehow I didn’t notice - I can’t figure out what is wrong though.

This is our bug, not yours.
This is because SavingWrapper.Load() isn’t reloading the entire scene (nor do we want it to), it’s changing the variables on the characters in the scene. There are a lot of potential issues with this, not just our lazy guards (They actually are alive, but their animator is stuck in “Dead”)
Ultimately, you won’t be using the S and L keys to save and load a scene, you’ll be doing it through a menu interface. That part comes in the fourth course “Shops and Abilities” (which includes Traits, main menus, and fine tuning)
There is a small change you can make to the L key to fix this bug now, however:
Go into and find the UpdateMethod. Inside the check for Keycode.L, change the line




This will properly reload the scene and fix the lazy guards.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.