"Load Game From Slot" Does not work from main menu

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.

This is the code I used for the two functions.

In the different menus all I do is call these functions depending on which button is pressed.

pls help!

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.

Thanks in advance for the help.

Definitely not an engine bug :slight_smile:

How is your save game every going to work if you make a fresh one every time the event is called?

Anything you’ve saved in there will be lost.

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?

I’m assuming you’re saving? Then you also need this stuff here

Hey It was originally there, But it was never coming back with true. at the previous branch so I slowly removed issues until it was barely anything left.

Im currently following this tutorial. Unreal Engine 4 Tutorial - Saving & Loading Pt.1 Basics - YouTube

Following Gameinstances and turning them Into hard saves. Its currently The closet Ive gotten to getting everything to function.

I havent restarted trying to save the booleans yet but all my highscores and records are being saved upon changing levels and upon exiting and entering the editor.

I apologize for wasting your time. I spent a week or 2 trying to figure it out and Had a major breakthrough after I left this.

Delete the save game file and try again. It might be the wrong type, if you changed a lot.

Here’s the save game 101


Thats insanely helpful. Im going to try this on my booleans. As Im still struggling to save those for the settings.

I just cant seem to get my options choices to save for eg. Click mph changes in game hud to mph insted of kmh.

This might fix it. Im gunna try now.

1 Like

This thread is almost 2 years old, but it keeps coming up in my searches. I just figured out a possible fix and I wrote about it here:

TL;DR delete the old save game files.

@xDashGG the difference in your two screenshots might be the Cast to BP_SaveGame. I had a problem where I changed my saved game format and I think the cast was failing. So the solution is what @ClockworkOcean suggested: delete the old save game file.