When level 1 finished and on level 2 when "<" is pressed

I was wanting my game to be when someone finishing level 1 and when they go to level 2 and when they fail it says game over and it gives them the option to go to level 1. I want the player to be able to go to level 2 when they go back to level 1 but they have to finish level 1 to do so. But if level 1 hasn’t been finished yet, they can’t go to level 2. I was thinking about a global bool but I don’t how to make it like I want it. So for instance someone plays the game and doesn’t finish level 1 the bool is false but when level 1 is finished and goes to level 2 they can go back to level 1 and go to level 2 in level 1 if it has been completed. How to do this?

i would do it with an global vriable, but not with a bool. first i would create a variable: levels_beaten or so. and then i would add a script that increases the variable by 1 if you complete an uncompleted level. then you could make a script that checkes if the current level is less than or the same as the levels beaten, and if yes, it shows a skip button this might sound a little bit confusing, but try it out

1 Like

@USERNAME3D Can you show me an example?

Here is a tutorial that explains quite well how to do that:

Ok, I am gonna do this with my other game that I know has a level menu and then try it with the game I was wanting to add this to.