Unlocking Characters with coins help

salino2835salino2835 Member, PRO Posts: 76

In my game, the main menu you're able to select between 5 playable characters. When you first play the game only one will be unlocked. Right know I have the coin system all set up and working and coins display on main menu. For example after the user gets 500 coins I want the next character to be playable.

My question is how do I do this? Should the locked characters self color alpha be .5 to start and have a rule when game.coins = 500 change to self color alpha =1? If that is how to do it, how would I make the actor not be clickable until the 500 coins is reached?

Thanks In advance!

Comments

  • salino2835salino2835 Member, PRO Posts: 76

    Also how would I use the save attribute so my game knows its unlocked every time the user launches the game?

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,928
    edited May 2017

    @salino2835 said:
    how would I make the actor not be clickable until the 500 coins is reached?

    Set the rule condition to ALL (not ANY):
    When Touch is Pressed and attribute game.coins ≥ 500 and attribute game.unlockedMario is false
         Change attribute game.unlockedMario to true
         Change attribute game.coins to game.coins-500
         [Save attribute game.coins]
         [Save attribute game.unlockedMario]

    When game.unlockedMario is true
         [whatever behaviors you want]

    To learn how to use Save Attribute and Load Attribute behaviors, Google gamesalad save game.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • pHghostpHghost London, UKMember Posts: 2,302

    @salino2835 said:
    Also how would I use the save attribute so my game knows its unlocked every time the user launches the game?

    If you have multiple characters, and perhaps other unlocks in the game, I'd suggest using a table, not save attributes.

  • salino2835salino2835 Member, PRO Posts: 76

    Thank you both for your help!

Sign In or Register to comment.