0 favourites
  • 4 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hello I've just made my first game using a score system. I have it like this: When you die/fail the game you get back to the "start" layout what I want to is to make it endless but if you reach 50 points before failing you get another layout to pop-up when you fail instead of the "start" one.

    The reason is that I want the game to be finished at 50, but it's much funnier if you can keep going and add a leaderboard.

    Appreciate help! / Orvis

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, using the same logic and almost the same action from your other thread:

    How do I change layout at certain score?

    You can do it like this:

    System > Compare Variable Value (Score = 50) -- System Go to Layout (name of layout)

    System > Compare Variable Value (either create a variable that checks the death of player or have a health variable for example to check that) -- System Go to Layout (the starting layout).

    The above will send you to the start if you die or if you get 50 score, you get the next layout on the list

    If however you want that the score will keep on loading the next layout automatically without you having to enter the Layout name after the score is 50. I think something along the below would work:

    For the sake of the example, I'll assume that you have your levels named as "Level1", "Level2", "Level3", etc... and that you will load "Level5" if the score reaches 50

    Create a global variable called LevelNumber (for example) and set the default value to 5.

    System > Compare Variable Value (Score = 50) -- System > Go to Layout ("Level" & LevelNumber)

    -- System > Add to Variable (LevelNumber) 1

    System > Compare Variable Value (Score = 50)


    System > Compare Variable Value (LevelNumber > 5) -- System Go to Layout ("Level" & LevelNumber)

    -- System > Add to Variable (LevelNumber) 1

    Hope the above makes sense.

  • Yea I got it What I did was that I created a global variable "LevelNumber".

    -"Game" Layout

    System->Set "LevelNumber" 0

    System->Set "Score" 0

    I kept the "when fail go to "start"

    System->Score=50->Add 1 to LevelNumber

    -"Start" Layout

    System->On start of layout->Add 1 to "LevelNumber"

    System->LevelNumber=2 ->Go to "Last Layout"

  • I hope that works, if so, I am glad it did

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