Save player position in different levels

Hi, how can I save player position in different levels?

This doesn’t work. What am I doing wrong here? I would be very happy if someone could show me.

Thanks in advance!

The open level node throws away everything after it, because the level you’re running this in gets closed. So the actor transform never runs.

If you want to use open level, then you need to put this stuff in the the level BP. That way, it runs when the level opens.

That’s what you mean?

Nope, that’s saving. Which by the way, won’t work if you’re creating the save game every time :wink:

You only need to create it ONCE. After that, it’s just saving and loading.

So, you have to save the player position. Then you load level X, and the level BP opens the save game and finds the player position and sets it.

But I’m not sure what the point of saving the player position in level Y is, and then setting it in level X?.. Isn’t the player just going to end up in the middle of a wall or something?

Are you trying to save the position in level X, then later, re-open level X and reset the position?

Do it like this. In your current level just the 2 and the open level from here

In the level BP of the level you’re loading, everything from here EXCEPT the open level node…

I’m confused, you need to show me the attachment of my example. Because it still doesn’t work.

Assuming you already have a save game, to save player position

Then load the new level

image

In the level blueprint of that new level, put this