Level Lock/Unlock
Greenkirby21
Member Posts: 32
So basically, my game is this, when you start the game, there are levels to choose from. When you first begin the game, level 1 is "unlocked", and once you beat level 1, it unlocks number 2. I am confused how to implement this. Do i basically make an attribute for EACH level, set 0 for locked, and set 1 for unlocked. Once that level is completele, set the next level to unlocked How would I save this so when a person quits, it remembers all the levels?
Thanks! You guys are awesome
Thanks! You guys are awesome
Comments
http://www.4shared.com/file/lZp0z-iF/LevelUnlockDemo01.html
currentLevel and completedLevel
currentLevel starts at 1 for level 1, and completedLevel starts at 0
at the end of level 1, right before you change the scene, change completedLevel to currentLevel
at the start of level 2, set currentLevel to 2
at the end of level 2, right before you change the scene, change completedLevel to currentLevel
at the start of level 3, set currentLevel to 3
at the end of level 3, right before you change the scene, change completedLevel to currentLevel
at the start of level 4, set currentLevel to 4
so on and so forth
so, on the level unlock screen, lets say you're altering level 10. Put code on it that says:
if completedLevel >= 10 show unlock graphic and if touched, goto level 10
otherwise
show locked graphic
something like that should work
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
you should SEE the code I used to change levels, that was when I tried to make everything a prototype actor, and before "change scene -> next scene was an option"
it takes 5 minutes to open that actor.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left