How do I 'Load Stream Level' by in game trigger

Hi,

When my player character overlaps a trigger box I want the ‘Load Stream Level’ function to happen, but because the ‘Load Stream Level’ node has to be called in the Persistent Level I’m not sure how to do this, hopefully it makes sense
MainMenuMap = persistent level
code opens level 2 when you hit 1 button and unloads level 1 when you hit 2 button, I need these to be triggers in the relevant game level instead


TLDR;
When Player in Level 1 and Overlaps Trigger, Load Stream Level 2
When Player in Level 2 and Overlaps Trigger, Load Stream Level 1
How to do this?

TIA

1 Like

Like this ( this is in the level BP of L1 )

I have the same thing ( except the other way around ) in L2

L1L2

This only works because I unload L1 when I load L2, and vice versa. If you don’t want to do that, then you need to write more elaborate code that knows when a level is loaded, and only loads it if need be.

1 Like

simple and elegant solution, thank you! :slight_smile:
Now to figure out direction facing unloads for each level.

UPDATE: I worked it out, see below

The following Persistent Level Map BP uses a Actor BP with only a Trigger in the Persistent level, using Flipflop removes the issue of going backwards over the same trigger for the same effect, it switches the effect.

For example…

Initially I had a trigger to load level 2 and unload level 1, if I went back that way it would trigger again meaning I’d have no level to walk into, to fix it without huge BP edits like Forward Vectors and player rotations etc, Flipflop is king!

1 Like

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