Save/Load System

I am trying to make a system that will save the players position from the pause menu and load it up by a button that can be navigated from the main menu. My main problem is the loading system, as I don’t know what to use as the wildcard. I have tried get Parent, get player Controller, get player Character and none of them work.

My save system seems to be working, but I can’t be sure as I need to be able to load the data to test the algorithm. I am relatively new to Unreal 4, so please forgive any unnecessary code and functions, or any seemingly simple mistakes.

Your “Pause Menu” I assume is a widget, so in order to “get” the widget you would need to go to the blueprint where you “created” the widget and right after you create it save it as a reference. Then from this blueprint in your screen shot you would “Cast” to the blueprint that created the widget (player character?) and grab the reference from that BP.

What would I save as a reference and how? Do you have any documentation or examples I could have a look at? I am sorry if this seems as if I don’t have a grip on the engine yet, but that’s why I am trying to do this

Here are some screenshots of my save system if that helps. It didn’t let me attach them initially.

Can you explain to me in steps what the functionality is you are trying to achieve? For example:

  1. Play the game, score points say 100
  2. Pause game
  3. Save point value @ 100
  4. Quit game completely (computer off or Unreal closed, etc)
  5. Load saved score from main menu HUD
  6. Play game starting with previously earned 100 pts

Is that what you are trying to do?

Looks like you are trying to change the player transform stored in the SaverSubclass?

It might be that you pass in the variable without the change to the save game slow - Have you tried linking up the SaverSubclass to the SaveGameToSlot with an extra node, instead of dragging it from earlier in the blueprint sequence?

  1. Open Main Menu HUD, and go to play game options
  2. From play game options select load game
  3. checks if save game exists
  4. if it does, load that slot, putting the player in the position where they last saved
  5. If it doesn’t, open a new game

From the pause menu

  1. Click on the save game button
  2. checks if save game exists
  3. if it does, overwrite
  4. if it doesn’t, save to that slot

These two slots are the same and there aren’t any reference to either in the third person character blueprint.

So looking at that set up, you shouldn’t need to “cast to pause menu”, that “on clicked” event should be called FROM the pause menu. And that button should create the save game object and write the data needed to be saved and then save it out to slot. All of that functionality should be handled by the widget. OR when I made this functionality for my game, I had the widget reference my game instance which held a function to write and save game data. Either way you should never have to cast from the on clicked button TO the widget. So that issue of the wildcard shouldn’t even exist if you script the logic differently. Does that make sense?

It kinda does.
Any screenshots to show me what sort of thing you mean?

  1. List item