Unlocking levels in game salad

AEPgamesAEPgames Member Posts: 11
edited June 2012 in Working with GS (Mac)
i have watched tshirtbooth's multiscreen menu's video part 1,2 and3. When i complete level 1 how do i make it to unlock level 2 ect, it doesn't work and i have followed all his steps, it only works when i press next level when i win but when i press home to check if its unlocked, its not PLEASE HELP

Best Answer

  • IsabelleKIsabelleK Posts: 2,807
    Accepted Answer
    We can't help you if you don't give more details.

    You should have an attribute for each level, and change it to true when the level is unlocked. And remember to save, and load them - so player keeps levels opened, when he restarts the game.

Answers

  • AEPgamesAEPgames Member Posts: 11
    ok more details

    in game , i have one attribute called unlock its a integer attribute and on number 1
    my level 1 image has a integer attribute which is on 1 and my level 2 attribute is on 2 ect
    and i have set the up according to tshirtbooths videos 100% exact
  • IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
    edited June 2012
    Let's make this straight - you have one attribute, and it works like this:
    If player unlocks level 1, this attribute changes to 1
    If player unlocks level 2, this attribute changes to 2
    If player unlocks level 3, this attribute changes to 3
    etc?

    If yes, that won't work, because if player is on level 3, and wants to go back to level 2, he won't be possible, because this attribute is 3, not 2. Unless you make a rule in each level button:
    If attribute game.Level is BIGGER or EQUAL to X (so 1 for the first level, 2 for the second, etc.)
    This will work as you want.

    And remember to save it, and load when Choose Level scene starts.
  • MotherHooseMotherHoose Member Posts: 2,456
    gameAttribute: unlockedLevels … index type … should start with 1 (change the zero)
    … that will make level1 playable

    add an attribute: index type … currentLevel … 0
    and change this with when touch is pressed on the levelSelect actor

    when player completes a level
    Rule: when
    Attribute: game.currentLevel = game.unlockedLevels
    -changeAttribute: game.unlockedLevels To: game.unlockedLevels+1

    (this will not change the unlockedLevels when player replays a level)

    image MH
  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @AEPgames When actor of type collides with (what ever you want it to collide with to make game.win pop up)
    Do change game.unlock lvl to 2
    and etc

Sign In or Register to comment.