How to keep "do once" after reloading level(LevelStreaming)

What i am trying to do is when you overlap a trigger it will unload the current level(levelStreaming) and load another level. Now in the new level when you overlap another trigger it will unload the level and load the previous level but if you go and overlap the trigger it would do nothing.

This is what I have:

-BoxBP

-BoxBPvar
BoxBPvar

-PlayerCharacterVar
MainCharacterBPvar

-Enums and Struct
ClassesUsed

ClassesUsed1

And what I get is this:


I know what’s the problem, the second time the “do once” is set as closed so that’s why it doesn’t work but if I remove that where I set it to closed when it reload the level the “do once” resets and its I can keep loading and reloading the levels when I overlap the box.

Yeah I know It’s bit long and maybe too much info. I have been trying to make this work but I am stuck and I really don’t know what to do.

I think it’s easier if you put those boxes in the streaming levels?

They are box1 is in level 1 and box 2 is in level 2. Box1 spawns box2 and despawn its self and vise versa. I figured it out how to do it basically I removed the “do once” and in LevelBP I did if var is true then destroy the box1 so you can’t overlap it and respawn box2.

This is how it looks now:

-BoxBP

-LevelBP

Funny thing is when I read your comment and you said put it in the streaming levels in that moment a lightbulb switched and I was like why didn’t I think of doing destroy actor in LevelBP.
So thank you :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.