Hello guys! I have save/load system and it’s working perfectly for a lot of variables. But I have a “batteries” in a game on different spots. So after player pickup batterie it’s hide it and add to bool array:
Nothing is glaring out the gate, however, you didn’t post any of the save/load functionality that I can see and some other key pieces of logic are missing. That said, if it’s working for other variables in your save I’m going to assume you know what you’re doing on that end. This really comes down to good debugging practices. If this were me I would attempt to isolate the problem to a simple save/load and that’s it, removing any gameplay functionality from the loop. Literally just write a little function that, on a key press, allows you to save some boolean values and load them back in…printing them on save and load. Make sure they line up. If they do, the issue isn’t with the save/load mechanism it’s something wrong with your logic flow.
I would also caution against using GetAllActorsOfClass as your array index. That function is not guaranteed to get all actors in the same order each time for various reasons. You can see some eluding to this exact issue in the following post
I am not found why this issue happened, but when I put “set array variable” to the beginning of the function (before another set variables) it works. Looks like some of them break my save bool array, but can’t figure which one