About Store Forum Documentation Contact



Post Reply 
Loading/Saving
Author Message
Brainache Offline
Member

Post: #1
Loading/Saving
I am implementing loading/saving in our project and need a bit of guidance:

I use a struct called cLiving that inherits Chr as the base for all Chr type objects, when I save the world, then load it... all seems to work (ie: the world saves and loads, camera resets to the saved chr's position, etc...) But I believe the objects are then being created as default Chr objects instead of my custom cLiving objects... How can I have loaded objects created using the custom clases they were when saved?

Thanks!
05-16-2009 05:49 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
Re: Loading/Saving
Hi,

They are saved with their OBJ_TYPE enum, and then according to that they're loaded to the specified object container. So it's working fine (they should be loaded as your class)

However remember that you need to extend the 'save/load' virtual methods (it's in most of the "game basics" tutorials, and "bloody massacre" tutorial)
05-16-2009 06:36 PM
Find all posts by this user Quote this message in a reply
Post Reply