How do I Convert from WebStorage to LocalStorage

0 favourites
  • 4 posts
  • Hello everyone.

    I apologize. I have been a member of the Construct community for a few years now but I am finally finding time to actually get into learning. I have bought some templates from the store, bought some courses on Udemy and I am studying the code. I know that webstorage was depreciated in 2015 but seems most developers did not get or listen to that message. I just bought 52 templates which all use webstorage instead of localstorage.

    Could someone please help me figure out how to convert this from webstorage to localstorage, then I can work on the other templates myself, as well as make sure I am doing this correctly in my own code going forward.

    Thank you all in advance for helping out the new guy.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It should be something like this:

    If there are other actions or sub-events in "On start of layout" which rely on values loaded from LocalStorage, you need to be aware that these values will not be loaded instantly. So you'll have to add "Wait" or "Wait for signal" or re-arrange the events.

  • Thank you for the help.

    That is similar to what I was writing as there was not much other options, but I though I may not be doing it correctly. Thank you so much for the clarification and the support. It is greatly appreciated.

    regards

  • Actually,

    Thank you very very much. I missed the setting of the localstorage in the System on start or layout. I missed it when I was looking to respond. You have made a huge difference in my learning. Thanks again.

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