Is there a streamlined way to do this?

Hello! I have been using this method of displaying the current level on screen. It works very well, but is a little annoying to have to go back in and add a new branch, set text and all that stuff when I have added a new level to my game. I was just wondering if there is a more simple way of doing this process? If not, no worries! Everything works fine.

1 Like

Sorry, mate. The link does not work for me. (404)

1 Like

Sorry about that! Here is an image. Thanks in advance!

1 Like

Hey there @Unrealgeek24! If you keep the naming convention L_Tutorial, L_0, L_835, L_Shrimp you can have the text set as Level (Everything after the underscore) by using a trick like this:

It just takes the part after the _ and applies the word level before it.

4 Likes

I would suggest creating a String-Text map and getting the corresponding text on demand:

Of course you will have to enter each level manually in the map but allows for a lot of customization.

If you have some sort of naming convention @SupportiveEntity’s solution is better but if your levels are unorganized (or you suspect that you can’t enforce a naming convention, or the names contain special characters that you don’t want in your strings) adding pairs of level - name would be the way to go.

Using maps would allow you to later replace the Text part of the map with a struct that contains much more information for the level (like images, descriptions etc.)

2 Likes

Hey @SupportiveEntity! I tried what you said an it worked great! This will help very much! Thank you!

Hey @dZh0! Thanks for the help! Much appreciated! Thanks for the tips, but I will indeed keep my naming convention L_ so @SupportiveEntity’s solution will work a little better for me. What you showed me is great stuff that I can come back to if I ever need it in the future though! Thanks for helping!