My Variable keep losing stored amount each time my actor is removed

Hey All

I am having this this issue with my stored variable keep losing its value when I delete the actor.

Before I added the destroy actor node, I was able to overlap the actor it would add to the stored bronze amount and
for every 10 overlaps it would add a sliver variable.

But As soon as I added the destroy actor node, when I play test it should going from 0 to 1 and remain on 1 but instead it goes 0 to 1 then straight away go back to 0. I really don’t know what is coursing this? as it works fine when I remove the destroy actor node? Please help me?

Many Thanks

Andrew Booth

Correct me if I’m wrong, but aren’t you destroying the actor that is storing how much bronze there is?

Thank you for your reply, at first I thought it remains stored and I will be re-spawning but now you say that it doesn’t make sense it would, what would be the best way to destroy the actor with deleting the data stored?

Are you able to send that data over to the player when the overlap happens?

If the Pawn is going to be destroyed, but you want the game to remember things about it, it is best to store that information in something related to the player that survives even when the pawn does not, such as a player state or player controller. These actors don’t survive the level changing (that destroys all actors in the level and then loads the next level), but they do survive their associated pawn being destroyed.