Help with Level Select Blueprint

Hello,

New to UE4 and looking for some guidance. We are creating a game and are implementing a level select system. The issue we are currently having is we cannot figure out how to have the button display text, currently the only way we know is for it to pull the level number, we would like the button to instead say the level name and point to the level after checking for unlock and completion.

Thank you for your help,

A.G

When you say “level”, do you mean level as in UE map assets? The things in the content browser that end in .umap? Because then it’s simple, given the fact that we don’t know anything else about your project and your UI. But, assuming you build your UI with UMG, you’d have an array variable in your widget that stores the levels’ names (type is Text or Name, not sure, but easy to find out). Each of your buttons need to have a Text widget as child, and it is this widget to which you pass the level names, one for each name in the array. When clicking on a button, you extract the Text and pass that to the Open Level node to load the map.

There really are several ways to do something like that, but you’d need to give more information if you wanted to go into details.

Thank you Rames, but the problem is with unlocking levels, for example we followed this tutorial 12 - UE4 Level Select Menu (and my Main Menu) - YouTube

And the problem is that we don’t know how to unlock the next level without +1 logic, you know “current level is 1, unlock next one 2 (+1), and so on”. How can that be accomplished with names or letters?

Regards,

A.G

Hey AG you could look at using a save state actor containing arrays for the whole unlock idea. Assuming your game is unlocked in series by completing the last level you could use the index number from the array of level names for this. To get the unlock you’d have a variable that saves the name of the last completed level, set on level complete. Then your save state would use a find to get the index of that level in your array and use a get +1 to unlock the next level in the array.

so:

save game>.Stores text of last completed variable

Menu>checks save game for last completed level. Find>>Foundindex+1>>next level unlocked.

I’m not at my work pc right now to give a decent bp example.

Thanks

Hey AG you could look at using a save state actor containing arrays for the whole unlock idea. Assuming your game is unlocked in series by completing the last level you could use the index number from the array of level names for this. To get the unlock you’d have a variable that saves the name of the last completed level, set on level complete. Then your save state would use a find to get the index of that level in your array and use a get +1 to unlock the next level in the array.

so:

save game>.Stores text of last completed variable

Menu>checks save game for last completed level. Find>>Foundindex+1>>next level unlocked.

I’m not at my work pc right now to give a decent bp example.

Thanks
[/QUOTE]

Hi thank you for the help.

We have tried to implement what you suggested but cannot seem to get it to work, would you be able to provide a BP example if it’s not too much trouble?

Thank you very much

A.G

Hello,

Just bumping this to see if anyone else might have solution as we have not been able to figure this out yet.

Thanks so much!

Is there anyone else that might have a solution for this? Thank you

I have array variable within structure with all level data that I need

In the main menu I have an array variable using the structure.

So I can get any data using the “tradicional” current level int.

On this way for example you can separate de display Gui name from the loading string.