How do I delete Local Storage when testing a game?

0 favourites
  • 10 posts
From the Asset Store
Basic Plugins for Firebase Authentication, Realtime-Database, Firestore, Cloud Storage
  • Hi,

    How I delete the local storage when testing a game? Can be done from Construct IDE or should I add a button on the game to do that?

    Thanks.

  • There is a clear storage action on local storage plugin

  • There is a clear storage action on local storage plugin

    Yes, but for that I would have to integrate it in the game. I was asking if there was a way to do it from Construct itself.

    I can add a button or something into the game.

  • Not sure why you're asking to clear local storage if you're not using it

  • Not sure why you're asking to clear local storage if you're not using it

    Who says I'm not using it? I want to clear the storage to test some features... thing is that I didn't want to have something "in" the game to do that, that's why I was asking if there was something to do that from outside the game so I don't have to be remembering to remove whatever I added to just clear the whole storage.

  • eka Hi, you cannot do that from the editor, since it is a local application's instance storage. I recommend just clearing it manually as you've mentioned using a button. But, you can also just clear it on startup too.

  • You asked how do you delete local storage when testing a game? If you want to clear the browser data then you go to the browser settings and clear data, this is outside of Construct.

  • I miss C2 because I could simply go to my computer and delete the files directly. However, I realize that things change in C3. Fine.

    However, I added in a clear storage with LocalStorage at the start of my game to try and clear it, but it still seems to not do that at all. Do I also need to save in local storage as well somehow since I'm currently using system function of saving a game to a slot under "mysave"?

  • I miss C2 because I could simply go to my computer and delete the files directly. However, I realize that things change in C3. Fine.

    However, I added in a clear storage with LocalStorage at the start of my game to try and clear it, but it still seems to not do that at all. Do I also need to save in local storage as well somehow since I'm currently using system function of saving a game to a slot under "mysave"?

    I did the following: Created a button on the main screen for clearing the local storage and a global variable called DEBUG, so when that variable is 0 I destroy the button so there is no button on the screen.

    I keep the DEBUG = 1 and when I need to publish/deploy the game I change it to 0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I appreciate the alternative, but creating a button did not work for me either (although I agree that it should have).

    Something happened to a sprite text on one of my saves so the list only shows "Lv1-0" instead of "Lv1-01". I have since fixed that and when I export the game to my phone this change shows. It shows in C3 itself, but when I do the preview layout or project, it still shows the old incorrect sprite font and doesn't reset the game proper.

    The way I fixed it was to disable my load button and have it reset the defaults for when the load fails (when there is no save data).

    All this to say... this process should be easier. While convoluted, I feel C2's "just delete the files on your computer" method was easier and quicker (once I found out about that answer that is).

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