How to make levels and objects lock and unlock

ChucklingMonkeyChucklingMonkey Member Posts: 92
edited November -1 in Working with GS (Mac)
Hi Everyone,
How would you make levels lock, and when you beat the one before it it will unlock so you can now play that level? Same with objects; when you earn a certain amount of coins, certain objects will unlock?

Thanks

Comments

  • AppsterAppster Member Posts: 112
    Hey C.Monkey, you can use attribute to save and load attribute to determine lock or unlock. Good luck!

    _______________________________________________________________________
    Appster - List New GS Games Here
    Mathstar Pro
    Mathstar
    5Ten
  • giacomopoppigiacomopoppi Member, PRO Posts: 914
    Yeah, make an attribute (levelReached - Integer)

    In the level:
    ---------------
    Create rule
    when you beat level
    change attribute levelReached to ?? (level)
    save attribute Game.levelReached - key lvl (example)
    ---------------

    Home screen
    ----------------
    Load attribute Game.levelReached - key lvl
    ----------------

    Level selection screen
    ----------------
    On each level Icon (level 1,2,3,4...ect)
    Create rule
    If attribute game.levelReached >= level icon value
    Change attribute SELF.unlock (create self attribute here) to 1
    change image - to an image without the lock

    Create rule:
    when self.unlock = 1 + recieves touch
    change scene- level ??
    ---------------

    Done, hope i helped ;)
Sign In or Register to comment.