How do I Add specific condition to a Level Select

0 favourites
  • 8 posts
From the Asset Store
Kids Game
$49 USD
New Sounds Added Update: 115 new sound effects added for no additional cost!
  • Hello guys,

    I made a level Select like this one :

    construct.net/en

    And everything worked perfect. But I want to know how can I add a condition in witch you can unlock a new level only if you make 3 stars previous level.

    Thank You!

  • You will need to keep an array with all the stars collected in local storage or on an sql server. On start of main many layout load the array from the local storage. Lets say cell 0 keeps level 1 stars, cell 1 keeps level 2 stars etc. Then you check each cell value and if cell is equal to 3 then unlock the level. Locking unlocking can be done using different object one clickable the other not, so when level is unlock you make the none clickable object to spawn the clickable one to its position and destroy the none clickable one.

    Its pretty hard to get it right on a first try, took me 2-3 days to get it right on my game. Here is a screenshot from my game that might help you.

    https://s17.postimg.org/8e17jz1i7/Screenshot_1.jpg

    https://s18.postimg.org/epgx2ra8p/Screenshot_2.jpg

    https://s22.postimg.org/9fwn1bh0h/Screenshot_3.jpg

    Edit: here is the link of the game in the arcade, if you are curious how the menu looks like.

    https://www.scirra.com/arcade/puzzle-ga ... sion-18913

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello imhotep22 and thank you for the quick response. So basically I have to change all the level select system I did ? I like this system but if there is no way on adding that condition I think I will change it. thank you again

  • There is no need to change the look of the menu, you just need to tweak the events a bit, the look can stay the same as it is in the tutorial.

  • Hello!

    I tried your method but somehow it does not work. Maybe it's because of my level Select Method.

    This is the method I used:

    So, is there any way to make what I said using this method shown above.

    Thank You!

  • Hello all ,

    I managed to do wat i wanted, it was quite simple. if anyone needs help just PM me.

    Cheers

  • Hello,

    imhotep22 Do you have any Ideea how can I save the level sprite animation using Local Storage ? I managed to save the currentlevel and it works perfect but it does not save the levelsprite frame.

  • You cannot save current sprite animation directly, instead you can save its state in a variable that you keep in local storage.

    Lets say you have global variable called animation_state its 0 on start, in the event where you change the animation, set the variable to 1 and save it in local storage, later on start of layout load the variable using local storage, and if its value is 1 add a event to change the sprite animation.

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