[Solved] Changing level problem

I want to make a game of 5 level. I have 7 scene …Menu scene,Levelup scene,Game Over,Level 1,2,3,4,5 . Total 7 scene. So when I will launch the game The menu scene apear. After I press start it will go to level 1 after completing level 1 the scene change to Level up scene .In the level up scene there is a button named Next level. When I press next level it will change the scene to Level 2.After completing level 2 the scene change to Level up scene.When I press next level again it will change the scene to Level 3. Please help me. I am stuck .I tryed pop up layer also but it didnt work

2 Likes

Try this menu tutorial. It’s basic but you can learn how to move from one scene to another using a button :slight_smile:
Link: Space Shooter [GDevelop wiki]

1 Like

I know about that but I want when I complete a level The LevelUp scene to show. and when I press next level button the next level to come and when this level is complete the LevelUp scene to appear again

Then you need to detect when the level is completed, then change the scene to the Level Up Scene. In the level Up Scene, you can create a button to go to the next scene.

You can use a global variable to keep a track of the levels completed and change the action of the button in the level up scene accordingly.

Oh! I have tryed is this ok? when I press start button it +1 to variable= level1 but after level 1 there comes the scene Next . I press the next level button it +1 to varriable= 2 variable=Level2 but it dosent come to level 2Screenshot_2|690x388

The condition ‘At the beginning of the scene’ (which is going to be triggered only one time when the scene starts) .
In other words just the first image at the start of the game, I doubt you’ll be as fast as 1sc/60 to click on the scene change button. :stuck_out_tongue_winking_eye:

2 Likes

https://we.tl/t-QZ7GGWA5di please solve it for me :sob:

1 Like

Yep you need to remove the at the beginning part and you probably want to add a “left mouse button down” condition too

1 Like

will you fi it please https://we.tl/t-QZ7GGWA5di

Here you go :grinning:

1 Like

Thanks BROTHER …You saved me thanks a lot

3 Likes

You see?
Is so amazing when you have a reply about your problem and when the solution is valid and everything works oh men…feeling sooooo good

3 Likes

Do you mind posting a screenshot of the working code? That would be super helpful!

Here you go

2 Likes

Excellent!

Thanks,
Vic Stizzi (YUMYODA)

If anyone is having this problem I made a tutorial about this How To make a Game for android using Gdevelop 5 (OutDated) - YouTube