I am trying to add to my array in a struct. This struct goes to my save object and it is for the “level”. My goal is to; on gem pick up, add 1 to player variable, handle destruction, and add the gem to an array of “collected gems” that is then saved. Once the map is loaded again the gem actor will be destroyed as it was added to the array and saved. The struct contains another array called doors, that I would like to populate similarly and be used the same way. I am not sure if I am adding the actors to the array incorrectly, or maybe they are not being saved/loaded properly or not. I assume all 3.
Just to make sure you know- actors & objects themselves can’t be saved just by adding them to a savegame. You’ll have to save the relevant data rather than the actors.
Yes it would. Maybe something like a Vector to Bool map. Or Int to Bool if you have a constant array of the gems. You just need some sort of identifier to tell the gems apart
Would you be able to show me what that looks like?
This is what I have right now, but im not sure what to put before setting members of the struct. I thought “add unique” would fit, but its coming up as none.