Saving/Loading

I have watched many videos on loading between levels and I just don’t get it. I’ve tried loading separate persistent levels and level streaming. I just can’t get the game to save your transform on different levels. I don’t want a link, I want someone in English to explain it. I have tried to do this for a bout 20 hours and my laptop is about to go flying out of my window. Every tutorial will have a roadblock that won’t make sense outside of its context. I have set up 3 different save systems and none of them correctly load when I transition from level to level.

1 Like

The most simple way is using the save game and the ‘open level’ node.

If you’re in level A, you come to a checkpoint, you write your location to the save game.

Then you move to level B.

After some time, you decide to go back to level A. When you enter level A, you read the save game, find your last position, and put the player there.

The crucial piece of text here is ‘when you enter level A’. There are a lot of different ways of doing this, but here’s one

  1. Open level ( level A )
  2. In the player on ‘begin play’, you read the save game, set the player location to that location.

But, there are many ways of putting the player in the right place, which is probably leading to your confusion. The other ways include things like: using the game instance, spawning the player at the loaded location, using the game mode, blah blah blah. But what I wrote above ( 1, 2 ) will work.

If this doesn’t fit the bill, you need to describe what you are actually trying to do.

Thank you for responding I will try to implement what you said. Your information is very helpful to me.

1 Like

You save the Level,Transform,Etc, pass them into game instance, load the level, then retrieve what you passed into game instance as it is persistent through levels and then set those variables, transform inventory etc

Main Menu Widget:
-Loading the save


In GameInstance:
-Passing the variables between levels

In Gamemode:
-Reading weather save data was set and if so setting the variables

When i load the save, i first open the level and pass the variables to the game instance, that function finishes, the level opens, Gamemode sees that isSaved is true, and sets the variables that it retrieves from the game instance

Like clockwork Said there’s tons of ways to do this, for me i have an option to load save from the main menu and this is how it works
Save from anywhere

Here is a tutorial that may help, if these pictures didn’t answer the question

This is my Savefunction

This is my Loadfunction

This is how my BPCharacter Loads and Saves right now

This is my SaveGameBP

I’m sorry I’m new and really struggling to customize blueprints after tutorials are finished. I know I should add a variable for player level or something? I’m just not capable of editing this on my own with even good advice, I will screw it up. I am like in my first 2 months of this journey, and I am really into level design more than programming, so it just needs to function. How do I add load a level location in my save data?

PS I Should have upload my blueprints from the beginning my apologies.

I am watching the link you sent me, thank you

If the save game is not immidiatly important id learn it slightly later on, its not complicated but it involves a few blueprints talking to each other in a specific order, id learn it after interfaces

RyanLayley and MattAspland make some good tutorials on Youtube, groku games dosent really make the most best practice type videos

1 Like

In the video he uses a menu widget, but does not explain how he made it or how he is using it. So frustrating… I’ve had his video paused for the 1 second he shows the widget design trying to recreate exactly like his. His widget also doesn’t have an event begin play. I deleted mine but in the tutorial for widgets I found they use begin play and I can’t get it back. Every tutorial on loading (outside of LoadLevel) has a hardstop at some point that I cannot recreate. Some variable that already existed in the video or something to that effect. This is a golden example.

Begin play should be as simple as searching begin play in any event graph, or on construct in some cases like widgets

I can’t search for it in the widget event graph or construct of the widget. Right click, type, nothing. I could create a new widget and recreate the entire thing just because that one has an event play already.

In the video he uses not 1, but 2 different widgets without explain how he is using them. They are already set up and he is modifying them. I don’t know how he is calling either of them. It seems critical to completing the tutorial.

Edit: I’m trying to replace all of the widget button events with simple key presses. Is this a viable solution?

Help

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.