I need help in >> level select

0 favourites
  • 8 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hi Friends

    In my game I have put level selection as per this tutorial

    My game is complete and now available in Google Play Store


    I have found a problem in my game

    In my game I have set

    when we Win a popup comes in front of current level which shows Stars we have get and having three button of

    a) go to home page

    b) go to next level or

    c) Restart game

    suppose i am in level 3, I won & Get 1 star then popup comes, When I click Restart button to play again, This time I get whatever stars 1, 2 or 3 those stars adding in 4 level, and if I again restart level 3 and gets any star its adding to 5 level and so on

    Reason is (may be)

    I do not go to world section

    i am just restarting game on standing over level 3

    May be, I have to add a condition where one every win 1 is adding to current level and value to level icon is settled as per stars we got. But I have no Idea What condition i have to add or any alternative idea of doing this. ??

    Please help me.


  • Bump

  • Without seeing your capx file, there's not much anyone can do apart from 'guess' what the problem may be.

    I'm going to 'guess' that you must have some variable set somewhere to the current level, or next level... maybe this variable is directing your stars to the wrong level?

    Maybe it's going to the wrong part of the array and setting stars there? Maybe check when the level is complete if the row/column shift isn't happening in the array or something like that?

    It would be more helpful if we had a capx to look at, or if you can make a simple capx to reproduce the problem so we can see it.


  • Hi SoldjahBoy

    I have attached Capx

  • please help

  • bump

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The working level save with correct star badge updating system:

    https://www.dropbox.com/s/vh3n39sk8z2dh ... .capx?dl=0

    I got stuck many times to get everything work correctly. But it finally done.

  • My triggerfinger is itching.

    Because, well, you state the problem and then you add: It is probaly because i've been lazy.

    Actually. You use 1 variable to represent current & next level ('currentLevel'). And you lossed track on it. If you had used two variables 'curLevel' & 'nextLevel', it would have been easyer to wrap you mind round it.

    curLevel = well the current level

    nextLevel = (curLevel + 1)

    Now if you want to change some in the array for the current level, (like changing the stars)

    it is located Array.at(curLevel,currentWorld)

    Change something for the next level (like unlocking)

    it is located Array.at(nextLevel,currentWorld)

    Using 1 variable is ofcourse no problem, if you can wrap your mind arround it.

    Change something (stars) for current level = Array.at(VariFORLevel,currentWorld)

    Change something (unlocks) for next level = Array.at(VariFORLevel + 1,currentWorld)

    On tap on Btn_Reload(x) .... add 0 to VariFORLevel

    On tap on Next_level .... add 1 to VariFORLevel

    You add 1 before the player made a choice, because you wanted to unlock next level in the array by using (the pretty lazy) Array.at(VariFORLevel,currentWorld) in stead of (more typing) Array.at(VariFORLevel + 1,currentWorld).

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