trouble with simple level lock/unlock idea

hey guys, I have a level select screen set up before you play the game and it has to arrows, one on each side of a number that says what the level is. I am trying to make it so that when I click an arrow it makes the level go up or down in the game, then you can click play and start at that level. That works fine, but i want to limit how high up you can go to how many levels you have actually passed in the game. I'm pretty stuck. anyone have any ideas? Thanks.
SM
SM
Comments
In your arrows add some conditions that disable when the attribute reaches your value. So say our range is 1 through 20
in your down arrow
When touch is pressed
and when game.levelnumber is > 1
--change game.levelnumber to game.levelnumber-1
In you up arrow
When touch is pressed
and when game.levelnumber is < 20
--change game.levelnumber to game.levelnumber+1
And when each level is completed have game.levelunlock increase by one.
Then your button rule would be
when touch is pressed and
when game.levelnumber is less than or equal to game.level unlock.
--Change scene etc….
Also if you search for Simple Level Lock/Unlock System in gamesalad under new you will get a nice little simple free demo that I made that should help you setup your lock/unlock system.
Also just to make you aware of all your options I actually have a pretty cool template I sell that might add an extra little pizzaz to the type of level select you are creating. http://gamesalad.com/forums/topic.php?id=23688 Check out "Menu Number 3"