Continue to Next Level

0 favourites
  • 5 posts
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • Hello,

    I am almost done with my game, just stumbled upon something i cannot figure out. My game is 72 levels, I would like to avoid having too many events for the "Next Level" button. I have named the layouts from 0-72, and I tried

    On Button Clicked ----> Got to Layout "Layout.Name+1"

    obviously it is not working, is there any way for this to happen?

  • str(int(LayoutName) + 1)[/code:1ivq9v1l]
  • If your levels layout are called "Level_01" to "Level_75", to go to the next one, you could do:

    Go to layout (by name): "Level_"& tokenat(LayoutName, 1, "Level_")

  • There are a few ways to go about it as mentioned above. This is the method I use:

    I name my levels "Level1" to "Level71"

    I create a global variable that determines which level I am at. Than when the player clicks on the next level button:

    Add +1 to CurrentLevelVariable

    Go to layout "Level"&CurrentLevelVariable

    I also create another variable to store the highest level I've cleared. This is useful as you can create a continue button like many games that will bring the player to the level they have yet to clear. Hopefully this helps a bit.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you very much, I actually used the 3 mentioned ways above for different parts of the game and now it is finally a complete level system Every time I think i reached a convenient level in C2, I notice that there is more possibilities and much more to learn.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)