Custom event from sublevel into main level

Hello!!
I have 2 levels. Level_A with is main level and Level_B with is sub-level. In Level_A i’m imported Level_B with levels tools and change streaming method on always loaded. In level blueprints Level_B has custom event “cs_level_b”. How i can get this custom event in level blueprints in my main level, Level_A?
Thank you!

You can do it with a lot of messing about, but it’s much easier to just put blueprint actors in the levels, they can just talk to each other.

Or, you can use the game instance. This is available everywhere. Put the custom event in the game instance instead of the level BP.

they can just talk to each other.

How? Say I have a sub level and I put an actor BP_Door in it, how can I trigger its event from main level? Seems that I cannot get a reference of BP_Door in main level, any idea?

You have to do it at runtime. So you can’t just use the eyedropper tool to select it before when you make the map, for instance.

When you have both levels loaded, it’s exactly like a single level ( at runtime ). So you can get a reference to the door using a linetrace, or with an overlap volume etc.

Thanks got it work

Specifically, in your main level, you can call ‘Get Actor of xxx’ to get a reference of the actor at runtime and call its function or trigger events

1 Like