Unlockable Levels

S-LS-L Member Posts: 52
edited November -1 in Working with GS (Mac)
Does anyone know how to make unlockable levels? (After you beat level 1, level 2 is unlocked)

Comments

  • simo103simo103 Member, PRO Posts: 1,331
    Tomsitems ... there were two sample/demo games made that one could download to see how they worked ... I'm using one a a basis for a game I'm making and it works perfectly. However the links to demo games and samples has been broken with the new site launch.

    If you want to post your email here I will .zip a copy of each of them and send over.

    S
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    a 10000 foot view.

    you need attributes for every single level.

    currentLevel
    level1unlocked
    level2unlocked
    level3unlocked

    then when the player reaches the goal of level 1, you need a rule that sets level1unlocked to true, and sets currentLevel to 1

    on the level select screen, each level select buttons needs a rule that says

    if level1Unlocked is true and is pressed
    goto level 1

    otherwise
    change image to lock

    something like that anyways
  • kadinshinokadinshino Member Posts: 82
    I like the method above but you could use a single attribute. Here's how I would do it. 

    Make an actor that can detect change at the end of a level, for me I have doors in toon tiger. 

    Make a  game attribute with a value to it, I used integer and set the value to 1 "this is to leave level 1 unlocked" call it level

    then on each level select or icon create a inner attribute integer with the value of zero. I'll name it unlock "This will be used like a true false statement"

    Then go inside your door and create the following

     "when actor receives event //change attribute to game.level  = game.level + 1" 

    on your unlock stuff you can go "when actor receives attribute = game.level 2 // change level.unlock to = level.unlock + 1
  • RHRH Member Posts: 1,079
    Yeh, there is no need to have anymore than one attribute. There is a game on my page that you can download. You'd just need to have a rule that is (for example):

    when level5 complete
    + when attribute game.levelsunlocked < 5

    change attribute game.levelsunlocked to 6 (or game.levelsunlocked+1)
Sign In or Register to comment.