Open level and call an event in a level blueprint

Hi everyone,

So this is what I want to do,

Call an event from a triggerbox, once the player overlaps it, to open LoadingMenu.umap and then call an event named GoToNextLevel which is in the level blueprint of LoadingMenu.umap.

How do I do this?

a bit vague in how much detail you actually need.
assuming you have the event made already…

maybe just click on the box in the editor so its selected > click open level blueprint > event graph > right click and type “onactorbegin” (you should see overlap node, click it) (you can also find it manually after right clicking and choosing “add event for box > collision> on actor begin overlap”

Drag out a node from it and type “open level” > add that node > fill in the name of the LoadingMenu (without the extension)

See what happens.

In the LoadingMenu Map… go it its level blueprint and add node EventBeginPlay drag out and run your custom event.

May want to add a 5 second delay between the custom event and begin play… at least at first to make sure its all working… it may load your loadingmap and then the next one before you see whats going on

Thanks, although I had everything set up except for the execution of the event.
I plan to use this loadingMenu between all levels, so an event begin play would not work.
I just need to execute the custom event.

sure
create a blueprint as a child of player state call it MyPlayerState or CustomPlayerState. Make sure your project is using it in the editor settings

Open the new blueprint and create a name variable called nextMap

when the player overlaps the box, before you load the lodainglevel do this

get player state > cast to MyPlayerState > (in myplayerstate) set nextMap variable

type the name of the next level to be loaded to set that variable. so if the current map is level01…then this box would set the variable to level02 and you’d do the same thing in level02 but nextmap would be level03… etc…

then in the loading map
instead of just loading a specified map,

cast to MyPlayerState > GET nextMap variable > pipe it into your custom event thats loading the next map name.

thats it.
can still use event begin play as the trigger
or event begin play > timer and type the name of the event

Is there another way to do this without a player state?

Like open the level, cast to the level name, and then see If i can execute an event in the blueprint level?