Saving objects in Save Game
It seems you can't simply save an object reference.
I have an array of objects; an inventory. The array type is a base class for items, the actual instances are healthpotions, weapons, or whatever.
Of course, I want the inventory to be saved in the saved games and then loaded back. But I don't know how you're supposed to do it, since i can't save objects (can i?).
What's the best way (or just a way) of saving something like that?
asked Aug 18 '15 at 06:28 PM in Blueprint Scripting
i ended up just making a structure, in which i save the class of the item and the number of them (an item can also represent a stack of items, like multiple health potions in one slot).
i get the class via
i then added an array of that structure in my saved game. on loading, i use
don't really like this system. for example if i had an item that's more complex, it would be difficult to get that to work. like a weapon that has weapon modifications on it or whatever.
there seems to be a sort of "archive" thing that can - if i understood that correctly - only be used from C++. seems like that can serialize things properly and that's what the
is that correct, or can that type of serialization be used from blueprints?
answered Aug 27 '15 at 09:58 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here