So I am making a game where you have to find oranges. I have everything set up, and I have a save and load feature. I also have a system where when you find and collect an orange, it destroys the orange. I set this up with a blueprint actor class. Now the problem I’m having is when you collect an orange, and then save and quit. The orange will either be there or all the other oranges in the map will be destroyed. I have tried creating a Boolean so when you do destroy the orange it will keep destroyed when you load in the game, but if I do that then all the other oranges will be destroyed. I know why this is happening, Its because all the oranges are 1 blueprint class. Anyone have any clue on how to do this? Or should I just create a new actor blueprint class for every orange i need?
Having them all spawned from one class is a good way to do it - especially if you make them instanced static meshes.
Maybe rather than just having an “Orange” class you have a “OrangeSpawn” class that is always there but spawns the oranges not collected?
It’s because your level hasn’t changed. It’s not possible to change the level during play.
You need to use the save game to record which oranges have been destroyed.
Then, on begin play, all the oranges ( or level BP ), look in the save game. If they were destroyed previously, they don’t spawn now ( or do spawn, but destroy immediately ).