Hi,
I am currently trying to save the state of the actors within my level to file for a little RPG I am working on. For this I read through Rama’s save-system-wiki-article(https://wiki.unrealengine.com/Save_System,Read%26_Write_Any_Data_to_Compressed_Binary_Files), which has answered me some questions on how I would achieve that. I believe I would be able to write variables to a file and read them back in, so far so good. But unfortunately it’s not as easy as saving a few integers and then at one point loading them back in. There’s something about the whole saving-process, I just can’t wrap my head around: How would I repopulate the actors with their respective variables? Especially, when I don’t directly spawn in the actors myself but load a level I built with the editor, but I still want to save the old actors (Or the fact they were destroyed) and any new ones. Or pointers, how would saving pointers work? I am completely unsure where to start with this, as there seems to be so much I’d need to do to just to restore a few simple actors. The only thing I can think of right now is to start with an empty level and literally write out every single actor to file, spawn it in manually and then somehow keep track of which actor needs a pointer to which actor (Not even sure how that would work because I can’t know beforehand which actors I’d need pointers to)… Nope, doesn’t sound right to me. There’s probably some better way, some kind of magic UE4-thing that makes this a little simpler. Or have I just missed something while reading through Rama’s article?
I’ll just make a specific case up that should cover most of my problems:
Let’s say I had everything set up as explained by Rama to save and load variables. Let’s imagine I were to create a game where the player just places some sorts of waypoints in the world (To create streets or something along those lines. I’m horrible at making up scenarios): Every waypoint is a visible actor with a mesh, location and rotation, but also it would have an array of pointers that contains all of the adjacent waypoints. Now because it wouldn’t be difficult enough as is, there are prebuilt levels in this game that already contain some of those waypoints and various movable meshes whose position and rotation also need to be saved.
To me this currently seems like a completely impossible thing to do to be honest. I don’t have any idea where to even start with this. I think I don’t understand something about the very core-concept of saving with UE4 and there doesn’t seem to be a lot of examples either. So to sum my questions up: How, would I use Rama’s saving-technique to save the level in the case posted above?
Hopefully somebody can clear this up a little bit
Thank you in advance!