How to make levels and objects lock and unlock

Hi Everyone,
How would you make levels lock, and when you beat the one before it it will unlock so you can now play that level? Same with objects; when you earn a certain amount of coins, certain objects will unlock?
Thanks
How would you make levels lock, and when you beat the one before it it will unlock so you can now play that level? Same with objects; when you earn a certain amount of coins, certain objects will unlock?
Thanks
Comments
_______________________________________________________________________
Appster - List New GS Games Here
Mathstar Pro
Mathstar
5Ten
In the level:
---------------
Create rule
when you beat level
change attribute levelReached to ?? (level)
save attribute Game.levelReached - key lvl (example)
---------------
Home screen
----------------
Load attribute Game.levelReached - key lvl
----------------
Level selection screen
----------------
On each level Icon (level 1,2,3,4...ect)
Create rule
If attribute game.levelReached >= level icon value
Change attribute SELF.unlock (create self attribute here) to 1
change image - to an image without the lock
Create rule:
when self.unlock = 1 + recieves touch
change scene- level ??
---------------
Done, hope i helped