Menu system...
TheWildShroom
Member, PRO Posts: 17
I thought this would be simple. I have World Menus and Levels within each world. Of course to start, only World 1, Level 1 is playable. I have a lock image over Worlds and Levels. My thought was, create a rule so that the lock image covers the Worlds and Levels so the image underneath cannot be 'touched/clicked'. At the end of each level, remove the lock image and at the end of a Worlds last level, remove the lock from the next World. This is proving more difficult than I thought. I don't see pre-built rules I can use to do this. Am I missing something?
Comments
It's not a built in function or behavior but there are lots of tutorials for un-locking levels online I'm sure. A Google search turns up lots of options:
https://www.google.com/?ion=1&espv=2#q=gamesalad unlock levels
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Create a table call it (TB_Levels), the rows will be (number of levels), and you only need 1 column , make it a boolean.
So if you had 30 levels , create 30 rows.
In your level select actor
create an integer attribute , call it levelID , give each level select actor a levelID number , level 1 will have self.levelID set to 1 , level 2 will be 2 etc..
Create this rule in your level select actor
if numeric expression tablecellvalue(game.TB_levels,self.levelID,1) = 1 (true)
(((inside create another rule ( if touch is pressed change scene to level scene)))
remove the lock image
otherwise
change image to lock image
In your world actor , depends on how many levels you have you can put a condition , if each world has 10 levels for example you can have this condition inside the world actor
if numeric expression tablecellvalue(game.TB_levels,11,1) = 1 ( true) ( this condition means if level 11 on the table becomes true)
remove lock image
otherwise
change image to lock image
Now you just need a level complete actor that will change each row to true and save table.
Here is 1 way to do it, demo attached