Download

Saving randomly freezes the game

I have made a Savegame Object:

b7175219a656c00801528ddf08651ef19a5ae4ec.png

When the game starts I do the following check:

0be2d0c571.jpg

When the player dies, this happens:

2af30ff3d0fa67986a974f66e911aba8fe780ce9.jpeg

895e2ebd77.jpg
7325c7e7c1d69690925888171ace916115f1af88.png
ad8b21fc162b46bff5524b624cdcbc5901e2d9ef.png

Though some times when I die, the game just freezes and the only way to play again is to restart the game. There is no pattern. The only way to solve the issue is to delete the save file that I created called “mysave.sav”, but that deletes all of the save data I put in there defeating the purpose of having the save file in the first place. Does anyone know what could be the issue here?

It’s hard to say with out having the files to play with but it seems like you might be handling save data poorly.

For example when the game starts you create a saved game object yet you don’t store it in a variable to access later. Because of this you need to keep loading the saved game object every time you need to access the data. Over time this will cause multiple saved game objects to be loaded which could cause performance issues.

Another thing I noticed is you have a branch where theirs a change it could false with nothing happening which would cause your game logic to stop.

Hopefully this helps, also below are a few screenshot of how I tend to handle my saved data.

UE4_LoadSaveGameData.png

UE4_LoadSaveGameData2.png

UE4_LoadSaveGameData3.png

Yeah my saving system is quick and dirty. Never saved data with Blueprints before. I had planned to remake it later as the system I currently got is just for a pre-alpha build and serves it’s purpose well. I will take note of your pictures.

However you pointed out that False branch I didn’t complete and actually plugging that out as it should be seems to have solved the issue.