How to Save Collectibles in my game

Hey Guys, So I made a simple coin collection game with checkpoints that save my game.

What is happening is when I collect let’s say 3 coins (destroy the coin actor) and pass through a check point, the game is saved at that point, and I die. After that I load the save game file, I collect another 2 coins at different position and die without saving. But when I load the game again the last 2 coins which I collected aren’t there, which means that I can’t collect them again.

What I want is that the game should remember which coins I collected and save that data and load the exact same moment. so that I can collect those 2 coins again.

I saw some other posts and tutorials, I know it has to be an Array or something but can’t seem to figure out that stuff. Please help me.

the bug is the collected set never gets written, only the checkpoint does. keep a set/array of collected coin IDs on the savegame: on coin overlap add the ID and save, on level load destroy any coin whose ID is in the set before the player sees them. coins grabbed after the checkpoint correctly come back because they were never written, which is exactly the resume behavior you want.

Advanced Save System, a save/load system plugin for Unreal Engine 5, wraps the slots + serialization for that in BP: Advanced Save System. on sale ($23.93).