Hi All
For our RPG the first level loaded contains data that must persist and is marked as DontDestroyOnLoad(). Subsequent in-game levels, in our case environments, are loaded as distinct levels, so we have a beach level and a town level and various other levels that the player can currently traverse, ‘zoning’ from one level to another when they hit a trigger.
One of the problems we have, is that we have objects in the world for a given level, such as Creatures and Items, and if the level is loaded, naturally the items are on the ground and can be looted quite happily, the creature(s) can be killed, but as we’ve done nothing about it yet, if the player zones out of the level and then back in, the creatures they just killed are back and so are all the items - this is to be expected of course.
So, I’m wondering about the best approach to ensuring that item data and the status of a creature (alive/dead, when it should respawn if it should) can be persisted across loads of the level. I’m thinking I need to do some sort of partial save and then apply that state as and when the level is re-loaded but I imagine that this is a problem that many people will need to solve and so I’m looking for a scalable solution - i.e. using a script that looks at tags or looks for particular scripts within the scene. I think I am most interested in how to persist the absence of an object in the scene?
I really apologise if this feels a little too broad a question, but in my view, this is a problem lots of games will have generally, especially where the player can pickup/drop or interact with the environment in some way.
Naturally this might be a subset of an actual save game system and on the subject of which I’ve posted on the EZ Game Saver forum a similar question, so anyone familiar with that framework please answer in either place! I use the EZGUI framework from ANBSoft and on the basis of how good that was and how great Brady is with support/fixes, if EZ Game Saver would work, that’s very tempting!
Thanks in advance
H