What's the better way to pass a character across level.

So right now, I tried to store a reference to myCharacter object in myGameInstance but it doesn’t work. So the only other way is to store all the data from myCharacter into a structure.

My problem with that is that I have 10+ myCharacter on my map which all represent a small army (between 3 to 5 other character). When 2 myCharacter from opposite faction collide, it triggers a battle which load a new level where the battle happen and then come back to the previous level where everything should be the same. That mean I have to save 10+ * 5 time hp, str value, dext value, equpiment, class… It’s a lot of information and it tedious so my “there should be a better way to do this” sense kind of trigger here.

Also, the combat level is not the same for each fight so having the battlefield far from the main action and teleport the camera back and forth is not an option. I also need this to be saved so the player can leave a fight and comeback using a save game object.

So, is it really that tedious and I have to go through it with nested structure or is there a better way. If there’s a better way, please point me in the right direction.

I don’t think you can bypass this hassle :slight_smile: You can also add one item to your checklist :
if you don’t want to create bloated heavy SaveGame, you’ll have to store simple types (aka create enum for equipment, classes, ect. and then spawn the correct type with a switch).
You could also use RamaSaveSystemwhich is a crazy good plugin.

Yeah, that’s what I thought but I wanted to be sure before doing the heavy lifting and finding out I just did something wrong to begin with.

Thank you for your answer!