[Solved] Question about changing scenes

I just found out about this engine today and really like it so far.
I find it a bit hard to figure out some things though.
I tried to make a reset button, that just changes the scene to the current scene (reloads it). How would I do this? How can I get the current scene name?

Another thing would be changing scenes by variable name. I defined a global variable ‘current level’ and set it to 0. Whenever the player finishes a level I increase it by 1 and want to change the scene to whatever it’s value is now. However, I tried setting the scene to ‘current level’ by GlobalVariable(currenLevel) and toString(GlobalVariable(currentLevel)) but neither works for some reason.
The levels are just named ‘1,2,3,…’ obviously.
What am I doing wrong here?

yes, unfortunately not clear enough is a variable a value or a string. when you want to refer to the name of something, it is alwasy count as a string. but when you are use it, the method of use decide what it is. it can count as a text, even so it is just a number. so you doesn’t need to convert a value to a string, just refer to it as a string. the correct syntax is it this case: GlobalVariableString(currentLevel).

1 Like

By clicking on the reset button do the Action to Scene>Change the Scene and choose the name of your scene.

Thanks @Gyuszko, GlobalVariableString() works! And that answers both my questions.

1 Like