Webstorage Not Working for Me

0 favourites
  • 5 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Way of the Sax guy here again!

    I followed this example...http://www.scirra.com/forum/webstorage-save-game_topic46118.html

    Here is my capx http://www.wayofthesax.com/tests/wayofthesax.capx (yes, new website!). 10.3mb

    A little explanation. First off, I've closed all unnecessary layouts and minimized unnecessary groups.

    As you can see on the dummy layout, when you click on one of the variables (for instance..."articles", which is what we're going to work with today) it tells the system how many articles have been collected. Try this. Run the dummy layout and click "articles" 3 times. Then click "menu" at the top. You will see on the bottom left that "Article Score" says "3/8". Good. Now click the "Save" button and the new black/white save button that pops up. Hit refresh. You will be back at the dummy layout. This time just click on "menu" and the "Load" button and finally the black/white load button. Nothing happens.

    My Webstorage events are in the menu event sheet at the bottom. I've double-checked the key and variable names with my global variables, in this case the "articles" global variable. I tried disabling my article score group and using the "every tick" method to set the text to the webstorage key. It doesn't work...

    Any ideas?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wow, 94 meg you werent kidding :)

    Sorry that download was taking a bit too long.

    When I have been stumped in the past sometimes its best to isolate the issue. Get webstorage working in its simplest form (in a new project) and then impliment it into your main project again and make sure that no other variables or events are messing with it.

  • I removed all of the music and sound effects to get it down to 10.3mb so it's a much faster download.

  • Ah I see what the problem is.

    In your save event you are using Key: "Asave" And Value: "articles"

    It needs to be Key: "Asave" And Value: articles (no "").

    I must say, your game is looking mighty impressive. Had I known I would have gladly downloaded the full thing to experience the sounds. Looking forward to a demo!

  • Haha, I just found the same exact mistake myself. So stupid of an error to waste my time on! Thanks anyway.

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