How do I delete save game data

  • I just noticed that in the system actions, there's no action to erase/clear/delete the date in a save slot.

    It seems fairly silly that Construct 2 wouldn't have it, so does anyone know if I missed it anywhere?

    @Ashley If this isn't currently in Construct2, I think it'd be really good to make it into the 200th release.

    Also how are global boolean variables not a thing yet? Come on, I saw posts about it dating back to 2011.

  • The way players can delete saves is by deleting cookies. I think that by saving in the same slot you'll overwrite the old save so you can just overwrite all the old saves when the user selects new game or something, however deleting saves like this from inside a level wouldn't work...

  • The way players can delete saves is by deleting cookies. I think that by saving in the same slot you'll overwrite the old save so you can just overwrite all the old saves when the user selects new game or something, however deleting saves like this from inside a level wouldn't work...

  • tarik00555

    I don't want to delete all the same slots, just individual ones. And not by overwriting them either.

  • You specify which slot you want to save in in the save action. I was just suggesting overwriting as there is no delete or clear slot action. You can try looking up tutorials about web storage as it does have actions to clear values and such. I personally haven't experimented with it, so I can't provide any concrete answer because I'll probably say something wrong.

    Here's some helpful links abaout web storage:

    Subscribe to Construct videos now

    https://www.scirra.com/tutorials/266/we ... nformation

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Or just update data on that slot to empty figures

  • You specify which slot you want to save in in the save action. I was just suggesting overwriting as there is no delete or clear slot action. You can try looking up tutorials about web storage as it does have actions to clear values and such. I personally haven't experimented with it, so I can't provide any concrete answer because I'll probably say something wrong.

    Here's some helpful links abaout web storage:

    Subscribe to Construct videos now

    https://www.scirra.com/tutorials/266/we ... nformation

    Webstorage for saving values like High Scores, I doubt it can save the full state of the game. This is also off-topic.

    Or just update data on that slot to empty figures

    You mean change the slot? Or what? "update data on that slot to empty figures", what does it even mean? With Save Slots you have the name of the slot and actions which either save or load it.

    If you're saying to change the slot, how would anybody do that in-game without access to the engine.

    And if it was possible, every time the slot get changed, storage in the HDD is being wasted since it's not getting deleted.

    No point in replying unless you know how to literally delete the data on a slot, since it's what I was wondering and the thread topic.

  • Hello I make a up to this topic because I have huge problem with the save/load in a slot and i want to know how to clear any save slot.

    What I did : use the action : save game to slot "mysave" ; tried it and it worked great.

    But since then, every time I press the button "run the layout" to test my gameplay, it load my save game which has saved a older version of my project. In case you were wondering I have erase all save and load action because of that. I feel like my project is totally screwed because whatever the layout, it always load the save game

    I dont understand why there is no option to clear/delete/erase the slot "mysave"

    I tried to clear all the cookie but that does not change anything.

    Any guesses or am I really screxed up and need to restart my project (which would be a pain)

  • Hello I make a up to this topic because I have huge problem with the save/load in a slot and i want to know how to clear any save slot.

    What I did : use the action : save game to slot "mysave" ; tried it and it worked great.

    But since then, every time I press the button "run the layout" to test my gameplay, it load my save game which has saved a older version of my project. In case you were wondering I have erase all save and load action because of that. I feel like my project is totally screwed because whatever the layout, it always load the save game

    I dont understand why there is no option to clear/delete/erase the slot "mysave"

    I tried to clear all the cookie but that does not change anything.

    Any guesses or am I really screxed up and need to restart my project (which would be a pain)

    First off: why do you have every layout loading a previous game?

    Second, go into User/AppData/Local and there will be a folder there with the name of your game and in the folder are the save games. If you delete those you should be good to go.

  • On the first : I found a code line on load complete.

    On the second : thanks a lot that what i was looking for.

  • This seems insane to not have this, that every preview i do of my game i have to refresh and remove files from folders. I cannot expect my players to do this, this kind of thing leads to masses of negative reviews. And no response from a mod/admin.

  • Ok I don't understand what type of save method you guys use but in the future use local storage and save the value's in keys. for example

    Make global variable and key to match

    Make the game save points add to the global variable , to save the game

    then when you want to erase save, change the global variable back to 0

  • I'm actually trying to implement save/load to a game...and also come to the conclusion that a clear slot or reset game is needed. My first idea was to make a first save called "resetGame" to be triggered at start of layout, then pressing a button for reset loads the slot "resetGame" that supposed to have the initual values... and it was working fine but now i see it's buggy because the save "resetGame" is triggered always layout starts...so the slot "resetGame" can save data several times and i only want to make an initial state save. I tried the "trigger once while true" but it is not working as i expected.. i'm new to C2...I guess is needed a var to flag if the initial state have been already saved, then don't save it never again.

    I just leave here the idea for if anybody finds it usefull.

  • My first idea was to make a first save called "resetGame" to be triggered at start of layout, then pressing a button for reset loads the slot "resetGame" that supposed to have the initual values

    Try using :On Loader Layout Complete: in System. It will only trigger once the first default layout of the game is loaded. Then you can play through the game and still load your setGame" while kee \ping your other slot.

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