How to Create A Next Level button with blueprint?

I created levels which are named as a Level0,Level1,Level2 … etc and im trying to pass to the next level when i press the next level button.I have created a blueprint script to that but its not working .How can i do that? Thanks for Help.

11.PNG

GetCurrentLevelName is Level01.
The Append will result in
LevelLevel01

@Raildex_ Thanks for your answer what should I do instead?

You can try to get the last number in the string Level1 so you end up with the 1 or 2 or 3… Then make that into an integer and plus that with one. Then in the open level you append the in the one string “Level” and in the other one you put into the result of the current level(1,2 or 3) + 1. Meaning if you currently are on level1 you would get a string called Level and integer1+1=2.

I made it into blueprint, it makes it easier to show you. “LevelNumber” (RightChop, Remove the five first letters you end up with only the number of the level) Then use that number +1 … Append this to “Level” you will end up with a string called Level and the next number. Hope this helps. I posted the blueprint for you to see

Example : If you are at “Level2” it will right chop “Level” out of the string and you will end up with “2”. 2+1 equals “3”. Append “3” to “Level” and the final string will be “Level3”

What you have done in the first post is going to end up with the string. Level(and the level name) “LevelLevel0”

Use Print string to see what you end up with in the string.

1 Like

@ThatLittleSpider Thank you so much for your help.

NP, I hope this solved your problem