Hi, I’m creating a video game and I recently started researching on how to make the save and load system for my game. After learning through different tutorials I managed to make that when the player presses a button the game is saved and with another button the game is loaded.
The problem is when I want to make it possible to do all that from a menu.
I have already made the pause menu to save the game and it works correctly.
But when I try to make it possible to load the game from the start menu it doesn’t work.
The mysterious thing about that is that if instead of doing it from the menu I change it to work when a key is pressed it works correctly.
Couple of problems there. One is, that you’re making the save game every time. That means that anything saved in there gets overwritten every time you save. You only need to make the save game once.
Second thing, is you’re using ‘open level’. That node wipes EVERYTHING that’s going on and opens the level fresh.
So you’re actor positioning is also getting binned.
If you want it to work properly, you need to load ( and set ) the actor transform AFTER using ‘open level’. In other words, the level you’re opening needs to read the player position from the save game and set it.
Ok, I didn’t understand very well, what do you mean when you say: “you are doing the save game every time”? Because the save system is stored in a CustomEvent that is executed when you press the “Save” button inside a menu.
And about the “Open level” node. I put the node unintentionally, I put it because when nothing worked I tried with “Open level” and I forgot to delete it when taking the picture xd.
After reading for a while your comment I think I understand that I have to put the node “Load game from slot” followed by open the level with “Open level” and finally I put the PlayerTransform. is this correct?
I have a suspicion that it is a bug in the engine because if I change the whole system to work when a key is pressed, it works correctly. But when I make it work with the start menu, that’s when it doesn’t work.
What I mean is: Write the level BP of you new level to check the save game for player transforms. Then, you can write the transform you want to the SG, and find it AFTER you’ve opened the fresh level, and put the player in the right spot.
Your guys issue is super interesting, Im wondering if Im running into the same thing.
Is mine equally saving twice? Im trying to understand saves but It wont load the save or even find the save. But apprently it does get to the end of this chain?
Im wondering If im saving at the start with create save and then saving over it at the end to make it null or void the save and thats why It never goes finds does save game exist as true?