I need help saving with local storage!

0 favourites
  • 8 posts
From the Asset Store
"Easy Local Notifications" enhances games with customizable local notifications.
  • Hi everyone.

    I'm having some issues saving what has been bought and what's selected on my ingame shop.

    I'm still new and I followed the wikis or tutorial about Local Storage however, im still having a difficulty saving some items properly.

    In this capx example that I created:

    https://drive.google.com/folderview?id=0B9tGN8-NMP_xQzFxUlZpclhXRzg&usp=sharing

    You have a basic shop, where you can buy and select the item/player you want to use.

    And im trying to save what has been bought already and what has been selected already.

    What im trying to accomplish is:

    1. If you buy an item, game saves, and next time you reload the game you dont have to buy it again.

    2. If you select a bought item, game saves, and next time you reload, you will see your selected item by default.

    3. Let say these buttons are players, if you select one, the other one de-selects. So next time you reload the game you will see the last player you selected.

    I'm using instance Boolean variables for the "Bought" and "Selected" items/players.

    I have encounter many bugs on the way im saving stuff and im pretty sure this can be done in a different easier way.

    Could you guys take a look at my capx and see where I went wrong? and what's the best way to do it?

    if you guys could fix my capx would be great

    https://drive.google.com/folderview?id=0B9tGN8-NMP_xQzFxUlZpclhXRzg&usp=sharing

    Note: On the capx

    1. if you press 1 it will reset global variables and clear storage.

    2. if you press 3 it will add 50 coins

  • Anyone?

  • Don't make it reset global variables.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey, unxcellent I've figured out the New local storage system however I don't have my files right now so I can't upload. One Workaround you could do is look for OLD WEBSTORAGE CAPXs and build your game over those. They are much much easier to use.

  • Hey, unxcellent I've figured out the New local storage system however I don't have my files right now so I can't upload. One Workaround you could do is look for OLD WEBSTORAGE CAPXs and build your game over those. They are much much easier to use.

    When you insert a new object, right click on the background of the pop up window and select "Show Deprecated Plugins". I prefer Web-storage myself.

  • > Hey, unxcellent I've figured out the New local storage system however I don't have my files right now so I can't upload. One Workaround you could do is look for OLD WEBSTORAGE CAPXs and build your game over those. They are much much easier to use.

    >

    When you inset a new object, right click on the background of the pop up window and select "Show Deprecated Plugins". I prefer Web-storage myself.

    Oh I didn't know that. Somehow I just assumed the old one was merged with the new one.

    Thanks for letting me know!

  • > Hey, unxcellent I've figured out the New local storage system however I don't have my files right now so I can't upload. One Workaround you could do is look for OLD WEBSTORAGE CAPXs and build your game over those. They are much much easier to use.

    >

    When you inset a new object, right click on the background of the pop up window and select "Show Deprecated Plugins". I prefer Web-storage myself.

    Wasn't aware you could do that...

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