Trying to fix this for half a day now - it’s super weird.
I’m saving all the objects you have picked up in an array in a savegame, so I can delete them upon loading the game, because they have been picked up.
Sometimes when saving, the objects get removed from the array. The length of the array however stays, the slots are just empty (I visualized this with print-string).
So what I tried now is that I let the game save every second, and I just sit there doing nothing. And sometimes during this save it empties itself again.
What the heck is going on?
Help is very much appreciated on this, as I am clueless.
At first:
So after further investigation I figured out that the array always gets emtpied after 35-50 seconds after starting the game.
As I understand this, it cannot maintain actors in the array that are not present in the world anymore.
I’ll now try to save them by name, not by actor.
Turns out I can’t find out how to find objects by name. I’ll instead destroy all components of the actors in question and not destroy the actor itself. So it’s still around but has no effect.