Hello guys I’m making a saving system and it needs to save a couple of things
An integer that increases when the player picks up and altar
The state of the altar(Has it being picked up; yes or no ? ) since there’s multiple of them per level and the players should not be able to pick it up if it has been already
The current name of the level to start from there ( I’m using level streaming, load and unload)
A widget that has the images picked up from the altar
Now my money on what causing the issue it’s probably the altar BP since the engine has crashed multiple times while having the level open and compiling this class, but I don’t discard that it might be something else.
Because I’m using level streaming, I cannot do a get all actors of class when I start the save. I need to do it on every instance of the altar on Begin play since this one gets called when the level is loaded
I think your problem is something to do with using references in your struct.
A reference is something that only exists during play when the map is loaded. Once the map has closed the reference means nothing.
I recommend giving each of your altars an ID, just an int that’s visible in the editor. You need to number each altar so the IDs are unique between the levels. In the game instance you just need an array of bools. Each alter knows which bool belongs to it, because it’s ID is the array index.
When an altar is picked up, it marks the slot in the bool array itself. When you re-enter a level, the altar knows it has been picked up and can destroy itself.
Same problem with the widget references ( is that what they are? ).
Yeah in the end I did an index for the elements that should be visible in the widget and I replace the references with a map int/ bool and the problem went away.