Handling Saving Destroyed Objects between different Levels (HELP)

It’s really simple. Anything that can be picked up has an ID, like this:

image

When you put it in the level, all you need to do, is make sure they all have a different ID

If you have a lot of them, you can use another BP to number them.

Let’s imagine we’re on level1, you need an array of IDs to know what you’re picked up in the save game

image

When a BP gets picked up, it does this

And then on begin play

That’s it basically ( I left out all the messing around with the SG for clarity, there’s a great way of doing that with game instance, if you want to know ).

Some areas for improvement are:

*) Make a parent BP that contains all the common code and concepts for pickups ( ID, collision, mesh, particle effect, savegame code etc ). Then all your pickups can just inherit from that parent.

1 Like