[PLUGIN] Savior

How to Setup Pickups to Auto-Destroy on Load:

Any Actor you wish to remember it was destroyed and should not respawn on Level load, you have to add a “Destroyed” Boolean Property to it. And mark it ‘Save Game’ tag as well:

https://i.imgur.com/Rmq7TDb.png

The Property must be a Boolean named “Destroyed”, case sensitive.
The Property must be marked ‘Save Game’ tag.

Then in your Blueprint Graph, create a new Function calling it whatever you’d like, this Function will be a substitute of “Destroy Actor” node for the Game.
Inside this Graph Function set the value of “Destroyed” to true, but don’t destroy this Actor before you save the Game, maybe hide it instead:

https://i.imgur.com/KHPG44O.png

Having that Boolean “Destroyed” Property set to TRUE will tell the Plugin that this Actor must destroy itself once the Level was loaded, making it be gone the next time a Player visits that Level…

To do that, when you want a Pickup to be destroyed, simply call your newly created Function that hides the Actor and sets “Destroyed” to True instead of destroying the Actor with a Destroy node:

https://i.imgur.com/uvp1CJM.png

Once the Game is saved, the Plugin will Destroy the Actor after it’s “Destroyed” Property has been recorded, so the Actor won’t be left there consuming memory.

1 Like