Hi, I want to unlock the levels of my game by the global variables and save this by webstorage. But the webstorage can't work. How can I do this??
I tried this:
(except level 1, the other levels have a global variable: level2, level3... whit initial value 0)
On end of layout(level 1) --> set level2 to 1
set local key "lev2save" to "level2"
And in the event sheet of levels:
if level2 is=1
on touch object --->go to level 2
On start of layout ---> Set level2 to Webstorage.localvalue("lev2save")
Now, if i deactive this (On start of layout ---> Set level2 to Webstorage.localvalue("lev2save")) level unlock work, if this is active the level remains locked (or unclickable), so I think I'm wrong on the condition for save the level unlocked, right? Maybe I need another condition to save the variable??