How do I change webstorage to local storage same values?

0 favourites
  • 2 posts
From the Asset Store
Simplistic hyper-casual game with nature elements. Tap to switch between the 4 elements and reach a better score.
  • hi i have an old project capx with webstorage and value "cont" for "continue"

    how to convert that to localstorage???

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In Local Storage, there is no more every tick checking for item existence because in Local Storage it will be a trigger and adding Every(X) seconds on the condition will be inefficient .But without that, It should be like this..

    --Without Regular every tick Item Check "Local key "Cont" exists (Efficiecnt)--

    *System -> Trigger Once

    --------->Local Storage -> Check Item exists("Cont")

    *Local Storage -> On Item exists("Cont")

    --------->System -> Set Global Variable Value "level" to LocalStorage.ItemValue

    --------->Sprite -> Set Animation Frame to 1

    --With Regular every tick Item Check "Local key "Cont" exists (Inefficiecnt)(Not a good idea but it is more like a WebStorage because of the regular every tick item checking)--

    In this case, I rather recommend finding a new way to check if Item exists like above or use variables to check rather than this method.

    *System -> Every(dt) Seconds

    --------->Local Storage -> Check Item exists("Cont")

    *Local Storage -> On Item exists("Cont")

    --------->System -> Set Global Variable Value "level" to LocalStorage.ItemValue

    --------->Sprite -> Set Animation Frame to 1

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