Top Down Stealth Toolkit

I’d suggest having a **Name **type array in the **BP_GameInstance **blueprint, with element 0 containing the Main Menu map name, 1 corresponding to the 1st level map name, and so on. You can then create an **Int **variable to keep track of your current level index in the array. For example, when you finish the first level, and has clicked on the Next Level button, you increment this variable by 1, then retrieve the element at that index in the Level Array, and call Open Level on it.

As for the UI side of things, we’ll have to go to the widget Widget_MissionSummary. You can create a duplicate of its Restart Button and change its text to “Next Level”. You can then have the On Clicked event for the new button to tell the BP_Game Instance (which can be called from anywhere by Get Game Instance >> Cast to BP_GameInstance) to handle the transition logic, which includes incrementing the tracker and opening the map name at that index in the array.

Apart from that, in the Event Construct of the widget, the validation check you mentioned can be added by asking BP_GameInstance if the array has an element at the next index. If it doesn’t, hide the Next Level Button, else make it Visible. Here is a sample screenshot of the same from one of my other projects:

Also, it would be a good idea to keep all of the Level Transition logic (index validation, increment, level array access, open level, etc) within the Game Instance blueprint. This way the UI does not have to know anything about the transition logic. All it does is tell the Game Instance that a certain event has happened, and lets it handle the rest. Plus if you have to do some debugging in the future, you’ll know that all the level transition logic is within the Game Instance BP only.

I believe that should get the level transition up and running. Just let me know if you have any doubts regarding the workflow.