How do I unlock levels by using WebStorage and For loop?
I'm using the map system for level selection.
System: Start of layout
--System: For "unlock" from 2 to 10
--System: WebStorage.LocalValue(str(loopindex)) = 1
--LevelPoint: ID = loopindex
----LevelPoint: Set locked to false
My events doesn't work
Do I have to use something else instead of loops?
Why don't you use an array? Set 0 for locked, 1 for unlocked and 2 for completed ones. Then you just compare values on the array.
Get rid of the"unlock" tag OR use loopindex("unlock").
blackhornet correct me if I'm wrong but I think it will work ok like that. It should access the index of the currently running loop.
Develop games in your browser. Powerful, performant & highly capable.
I've changed my mind, I'm actually want to lock the levels until the previous level is completed. But I think I want to enable the player to play any levels available in the game.
codah You are correct. It does still work.