How to make a level lock

mdk5316mdk5316 Member Posts: 26
edited November -1 in Working with GS (Mac)
I have the levels locked and working correctly. My issue lies within this...
When I play a level, the preceding one unlocks. However if I play the same level again,
other levels keep unlocking, how can I fix this?

Comments

  • ozboybrianozboybrian PRO Posts: 2,102
    You mean they stay unlocked?

    You need to set up a rule for the reset actor.

    When actor is touched Change Attribute, game boolean to false. (levels to locked) basically the opposite of what you do to unlock them.
    or something like that.
    Hope that helps.

    -----------------------------------------------------
    Join the GameSalad Community and have your game noticed for free.
    http://www.facebook.com/ListYourTopiPhoneGame
    List your Top iPhone Game on FaceBook!
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408


    check out the multicreen menus tutorials, i think the 3rd one deals with locking / unlocked.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    It would help to know how you are unlocking. I normally use an integer attribute and and add 1 to the attribute when each level is complete. If that is how you are doing it try adding this to the rule that triggers the level unlock increase

    If attribute game.levelunlock is < CurrentLevelnumber

    Obviously game.levelunlock will be what ever you have named that attribute and there is a couple ways you can do current level number. You can set an actor attribute in the actor that rule is in and then you only have to open each instance of that actor and set the level number without unlocking the rules of the instance or yo can create a scene attribute for the level number however you will have to unlock each instances rules to access and add the scene attribute to the rules. I normally just do the a self attribute in the actor.

    Good luck, hope that helps.
    ___________________________________________________________________________________
    GS BubbleBall Template HERE!!
    Stacks Level Selection Template HERE!! Now only $20
    AppSolute Entertainment on Facebook
Sign In or Register to comment.