Hi, so I’m adding a new game function to my game, in which it’s deleting all the old save slots from the folder(I checked after deletion completed), but after loading up the new game’s first level, some data from the saved game is still presenting - e.g. killed enemies are gone, loots taken is gone.
For any reason that this could be happening? I’m scratching my head now.
But quitting and re-entering the game seemed have solved the issue, but it’s not intended way to start a new game.
Yes that’s the exact folder I checked, it’s empty already before I load the new game and after the new game is loaded, some data leftover is still presenting.
It seems like an editor thing so far.
I finally packaged my game and created new games for over 30+ times and not a single bit of error when loading.
I think I got insanely struggled in time like this - sometimes I can’t tell if it’s my codes or the editor itself. It makes trouble shooting so difficult at times. Spending the whole day trying to figure out what’s wrong with my code but eventually I think it’s the editor itself… I’m died.
But still what could be causing this issue? Anyone experienced this?
Or is it always good to package your game before doing any real testing?
Is the editor reliable for getting idea of how the game runs eventually?
yeah basically editor make you fool many times, one thing is not happening and you’re going to call an ambulance for your self and then you just restart your project and everything is resolved, specially when working with C++
. yes it’s best practice to package your game to test multiple functionalities.
It’s happening the opposite to me. I delete all savegames from that folder. In editor it works properly. No save data is found. But then, upon exporting the game, and then playing it, 2 save games appear out of nowhere… Does anybody have any clue at least of what it could be? Thanks in advance
I kind of bypassed it by doing this cavemen technique. It deleted any hidden remnant, and then I disconnected the blueprints to export. And it now works, so the problem is gone. However, the way in which I solved it is not the proper one. There was definitely something hidden that could not be erased by deleting the files in the folder. And I had to create this pseudo code to solve it. Maybe I don’t know the engin fully, and I’m mistaken, but shouldn’t there be any built in tool within the editor for this? Just asking in case I don’t know.
I’ve encountered issues like this before, for me I just manually cleared or reset the variables linked to the data being held. I think it’s because deleting the savegame in slot won’t clear the variables in the save game object so if it’s at runtime they can carry over, may be a better way of doing this but for me like I said I just manually cleared the variables on savegame delete, so for example if you’ve got an array of enemies that have been killed and shouldn’t spawn, try clearing the array manually on delete
Thanks! Yep, I think that was happening to me. But also, even with the deletion in this way, this new time just now minutes before me replying now, it didn’t work. I was because I had already created a save in the real game (not the editor). The solution above by Arjun worked perfectly in that case. It’s also very logical