0 Favourites

Webstorage Variables switching on APK?

  • I have some global variables that I save in Webstorage for sound toggles, initial value of the variables are set to 0(on)and can be changed to 1(off) with an On Touch event. When I test in browser & CocoonJS launcher everything works correctly, but when I export the game and compile an APK with CocoonJS and the game is installed on a device, the 1st time the game is ran the variables are set at 1 for some reason, if I check the options toggles and turn them on setting them back to 0(on) the settings stay fine from then on when you reopen the game, but it's just that first install the variables are set to 1 so the sound if off by default. I triple checked the variables, they always start at 0 and they can only be changed with an on touch event that is on a completely different screen, not sure what is happening here.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • The question now would be, does the preview share the same folder as the export?

  • The question now would be, does the preview share the same folder as the export?

    Are you asking if I'm exporting the same one that I'm previewing? Yes I am.

  • Finally fixed this by putting the webstorage inside of int.


    instead of


Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
76 8,616
serivesmejia's avatar
Unread hot topic
73 5,674
glacierstudios's avatar
Unread hot topic
46 8,274
Ashley's avatar
Ashley Construct Team Founder