Saving variables to save game

Hi,
I’ve followed the below tutorial.

I’m unable to work out how to save the players LOCATION, ROTATION and set true based on event which equals having a red key and or blue key.

The game can start, I can save, but when I press Continue, I load at what seems like 0,0,0.

Continue button (from main menu)

Player blueprint

Clicking continue isn’t using the player location/transform which I set when hitting the 4 button

There is a comment on the video about location in particular and i tried to implement but couldn’t do it, he stated Vector but I’m sure it was Transform that was location so now I’m just confused.


7 Likes

Are you setting the actors location anywhere? When you hit continue it loads the saved transform to a variable but that doesn’t do anything by itself, you still need to use that variable to set the actors location. It has to happen after the level is loaded or it will get reset. The person said to save as vector because he was only talking about location… transform is rotation, scale, and location.

5 Likes

Hi @jay001020 thanks for responding!

I’m trying to set the actors location by pressing 4 at the moment in the second screenshot but I have no idea how to do it properly as I’m very new to UE, therefore a lot of this goes over my head but I’m trying to make it work

This is what I thought should work but it does not
image

perhaps it needs to be in the pause menu somehow where the save function itself is instead of manually triggering it

3 Likes

That is just saving the current transform to a variable, Set actor transform is the node to set it.

2 Likes

Still spawning at 0,0,0, is the below right?

Ah I can see that the player isn’t spawning also now i check while running

1 Like

Setting the location should look more like this;

ssdd

2 Likes

Okay, so I have this now

I just need help to work out how to spawn the player and use that saved transform

If i hit ‘4’ now I teleport

2 Likes

Went to the YouTuber’s Discord and had someone help me resolve the issues there, thanks for the assistance :slight_smile:

1 Like