How do I use the LocalStorage Plugin?

1 favourites
From the Asset Store
Unlock platyers earning coins, and save it with Localstorage
  • this is version 200

    https://www.dropbox.com/s/4yfw5s6zmokop ... .capx?dl=0

    i'll really thankful to you for you helping hand

  • this is version 200

    https://www.dropbox.com/s/4yfw5s6zmokop ... .capx?dl=0

    i'll really thankful to you for you helping hand

    I checked your capx file.

    Go to event sheet 2 and then delete "Load Save Game from Slot..."

    Then it should work.

    The Save Game function has nothing to do with localstorage.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • but i want to save 2nd Layout's animation frame

    i have used local storage for that with

    exit, get if get - set "BG" to system>sprite.animation frame

    but this is not working

  • I followed your tut and Local storage work fine on browser but when i test it on xdk app preview I get some big random delay when I switch betewn player skin.. I'm using a variable and events like if variable is 1 change frame to 1 ecc... I did not use array here...

    Do you have faced the same issue?

  • I followed your tut and Local storage work fine on browser but when i test it on xdk app preview I get some big random delay when I switch betewn player skin.. I'm using a variable and events like if variable is 1 change frame to 1 ecc... I did not use array here...

    Do you have faced the same issue?

    Actually yes. Same happens to me if I use the Firefox browser for testing. It seems like the LocalStorage works on the first read/write, but then it tooks very long to get the data.

    I also get a JavaScript Error than. I guess this is an issue with the LocalStorage or with Firefox (and the InApp Browser for Cordova).

    Regards

    Andy

  • > I followed your tut and Local storage work fine on browser but when i test it on xdk app preview I get some big random delay when I switch betewn player skin.. I'm using a variable and events like if variable is 1 change frame to 1 ecc... I did not use array here...

    > Do you have faced the same issue?

    >

    Actually yes. Same happens to me if I use the Firefox browser for testing. It seems like the LocalStorage works on the first read/write, but then it tooks very long to get the data.

    I also get a JavaScript Error than. I guess this is an issue with the LocalStorage or with Firefox (and the InApp Browser for Cordova).

    Regards

    Andy

    one way it could be to change the variable and then during the gameplay save the variable with the localstorage. I will try this

    thanks Andy

  • it's working now ! seem that like so it's working, I do not have any delay no longer anymore and when I restart the layout the localstore works as expeted even I you leave the game instantly !

  • I have opened a bug report, because the LocalStorage still crash when I'm using Chrome. All other browsers are working fine.

    Here is the link to the topic.

  • pls help dont work <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad"> my file : https://www.dropbox.com/s/4ev7ekcecchrg ... ?dl=0&s=sl

  • pls help dont work <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad"> my file : https://www.dropbox.com/s/4ev7ekcecchrg ... ?dl=0&s=sl

    Hi,

    can you please recheck your link. It seems to be cutted.

    Regards

    Andy

  • dropbox.com/s/4ev7ekcecchrg5p/flappyh.capx

    Hi,

    now the link worked

    I checked your file and you and you made following mistake.

    On the start of layout you check if the key exists. That's fine.

    But you must setup a condition then "If key xxxxxx exists" and not "on item xxxxx get".

    So just make the changes shown on the screen shot above and your save/load function should work.

    Regards

    Andy

  • tanx andy

  • tanx andy

    You're welcome

    Regards

    Andy

  • I seem to have a problem. I have a fairly simple localStorage high score function that works fun when I run the layout from C2, but when I exported it and uploaded it to chromestore and scirra arcade, it just returns 0, any ideas on how i could fix this? thanks.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)