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.