Download

Save Game / Load Player?

Hi All.
I’m sure someone’s run into this before but SEs are coming empty for me.

I would like to re-load all character variables when clicking load. The SaveGame process memorizes the “player” as 1 variable. all the info is saved along.
I can’t seem to find any way to make the player use those variables, or spawn from this variable.

Maybe I’m just barking against the wrong logical tree?

An acceptable alternative would be a way to loop all the variables and copy the content from same name to same name. Though I doubt the engine structure allows for anything the like, as variables are always strongly typed.

You need to save each variable from your player (that you want to save…like health etc) and load it.

I resolved to doing so for now, but this isn’t a good solution at all.
There’s way too many variables that need to be manually saved and re-set this way… in fact, it defeats the whole purpose of OOP if you end up re-doing things manually…

It’s pretty much how save games work. If there are way too many variables, are you able to perhaps re do things so there aren’t as many. Also, perhaps you could use structs to make things easier when it comes to saving and loading.

Well, the whole point of having more then a few variables is to actually allow for a higher level of customization. Cutting back on what works is basically counterproductive.

Structs will definitely end up being used for menus and such anyway, and that does help somewhat, but the work I was hoping to cut back on is the 40something odd variables that determine the player state.

Literally, all of that could be bypassed by saving the player variable along with all the sub-variables and allow for the same to be reloaded though a spawn from variable node. I’m guessing as things are currently the only way is to just create the system in C++ as a plugin, creating custom nodes that just do everything “manually” elsewhere…