garyrossiter - Maybe you can use an array to unlocking levels.
Firstly, when a level is complete, store a data in an array using Set at X action. Like this:
Array: Set at X:
X = Current level number
Value = 1
Secondly, store the array data as JSON inside the Local Storage using Set Item action:
Local Storage: Set item:
Key: "level"
Value: Array.AsJSON
Thirdly, at the level selection screen, retrieve the array data from the Local Storage:
System: Start of layout:
|-- LocalStorage: Check item "level" exists
LocalStorage: On item "level" exists:
|-- LocalStorage: Get item "level"
LocalStorage: On item "level" get:
|-- Load from JSON string LocalStorage.ItemValue
Finally, use a loop with the array once loaded, you need a "button" sprite with a number of frames and a Boolean variable:
INFO: Place these events inside the On item "level" get event!
System: For "level" from 1 to <the total number of levels>
== Array: Value at (loopindex) = 0
=== ButtonSprite: Anmation frame = loopindex
=== | -- ButtonSprite: Set lock to true
I hope this works.