Download

Storing variables

Hey everyone,
I have a tree that gets destroyed and it respawns, but as soon as I set a delay it never respawns due to my blueprints variables being destroyed as well with it. I was told to store my variables in a separate blueprint but I have no idea how to do that. I want my main tree blueprint to store a position and send it to another BP and then call on it afterwards.

Any help would be awesome! :smiley:

Hello,
i have two different ideas that you may can use if you like them.
First, you create the blueprint that you want to use to store your variables and you use “cast to” and drag from it all your “set variables” on destroy and all your “get variables” on respawn.
Second, you cheat ^^ and you don’t destroy your blueprint, you only set it invisible. Then you move it to its next location and you set your delay and set visibility back.

Fen is right about option 2. It is easy and will help cut down on memory usage.

Finally got it working with option 2. Thanks so much!

Happy that helped you ^^