# Save player position.

**URL:** <https://forums.unrealengine.com/t/save-player-position/280055>\
**Category:** Community & Industry Discussion\
**Tags:** unreal-engine, playerstart, question\
**Created:** [April 9, 2014, 6:41am UTC](https://forums.unrealengine.com/t/save-player-position/280055 "2014-04-09T06:41:23Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Endika](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Endika](https://forums.unrealengine.com/u/Endika)\
**Post date:** [April 9, 2014, 6:41am UTC](https://forums.unrealengine.com/t/save-player-position/280055/1 "2014-04-09T06:41:23Z")

</div>

Hello. I would like to know how can I save player position in order to spawn him in the right place when he continues playing after a saved game.

---

<div class="post-metadata">

**Author:** ![HoOz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HoOz](https://forums.unrealengine.com/u/HoOz)\
**Post date:** [April 9, 2014, 8:41am UTC](https://forums.unrealengine.com/t/save-player-position/280055/2 "2014-04-09T08:41:52Z")

</div>

Hello,  
Have you seen this question ?

[How can I add a savegame or specific variables? - Editor Scripting - Unreal Engine Forums](https://answers.unrealengine.com/questions/25747/how-can-i-savegame.html)

---

<div class="post-metadata">

**Author:** ![Endika](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Endika](https://forums.unrealengine.com/u/Endika)\
**Post date:** [April 9, 2014, 9:14am UTC](https://forums.unrealengine.com/t/save-player-position/280055/3 "2014-04-09T09:14:30Z")

</div>

YEa, but I can’t figure out how to save players vector.

---

<div class="post-metadata">

**Author:** ![HoOz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HoOz](https://forums.unrealengine.com/u/HoOz)\
**Post date:** [April 9, 2014, 9:34am UTC](https://forums.unrealengine.com/t/save-player-position/280055/4 "2014-04-09T09:34:54Z")

</div>

- Create savegame class blueprint type
- players location are stored as transform type(combination of location ,rotation and scale), so make a transform variable in you savegame blueprint
- Add an instance of your savegame subclass to the blueprint in which you want to save data.
- set the values you need to save in the savegane variable (in your case it’s player transform ,and you can get that by using get player pawn/character function ,then drag another node and choose get actor transform and set it to the savegame variable) and pass that to the Save Game to Slot node

---

<div class="post-metadata">

**Author:** ![Endika](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Endika](https://forums.unrealengine.com/u/Endika)\
**Post date:** [April 9, 2014, 9:53am UTC](https://forums.unrealengine.com/t/save-player-position/280055/5 "2014-04-09T09:53:30Z")

</div>

I have created the savegame blueprint and inside, the transform variable. What is a savegame subclass?

Can you post an image of a blueprint?. Thanks a lot!

---

<div class="post-metadata">

**Author:** ![Endika](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Endika](https://forums.unrealengine.com/u/Endika)\
**Post date:** [April 9, 2014, 10:20am UTC](https://forums.unrealengine.com/t/save-player-position/280055/6 "2014-04-09T10:20:26Z")

</div>

Here is my blueprint. I want to make the playerstart move to a desired position when the level starts. (or when a level is load) to keep track of where eas the player when the game was saved.

 ![3574-sin+título.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/9/0/a90045d2327d321426135c05b94d937122b542d2.jpeg)

I have no idea why the player doesn’y move at all.

---

<div class="post-metadata">

**Author:** ![HoOz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HoOz](https://forums.unrealengine.com/u/HoOz)\
**Post date:** [April 9, 2014, 10:25am UTC](https://forums.unrealengine.com/t/save-player-position/280055/7 "2014-04-09T10:25:14Z")

</div>

savegame subclass is your new savegame blueprint class.

you need to make a variable of the new type.

I’m making one right now I’ll share it

---

<div class="post-metadata">

**Author:** ![HoOz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HoOz](https://forums.unrealengine.com/u/HoOz)\
**Post date:** [April 9, 2014, 10:44am UTC](https://forums.unrealengine.com/t/save-player-position/280055/8 "2014-04-09T10:44:36Z")

</div>

Here’s is how to do so (NOT TESTED)

**In the new Savegame blueprint**

 ![3575-1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/7/7/977427303d947d2512a23bfbcb8cb3a9a79db33d.png)

**In blueprint which you want to save data**

 ![3576-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/b/6/ab638f5643d5a09cf9596a64194145346f8f9e81.png)

---

<div class="post-metadata">

**Author:** ![HoOz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HoOz](https://forums.unrealengine.com/u/HoOz)\
**Post date:** [April 9, 2014, 10:59am UTC](https://forums.unrealengine.com/t/save-player-position/280055/9 "2014-04-09T10:59:26Z")

</div>

You are not setting the player transform to your save game variable (settings in your blueprint),

Here is how to solve this:

drag a node from settings variable and choose set player transform,

target pin is settings

transform pin is you transform

drag another node from settings and choose save game to slot

---

<div class="post-metadata">

**Author:** ![Endika](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Endika](https://forums.unrealengine.com/u/Endika)\
**Post date:** [April 9, 2014, 11:16am UTC](https://forums.unrealengine.com/t/save-player-position/280055/10 "2014-04-09T11:16:33Z")

</div>

This should work. Why is failing?

 ![3577-sin+título.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/d/5/0d5b6c70047509e38b8c5179fd588b2af76a4386.jpeg)

SOLVED. SEEMS to return true. 🙂

---

<div class="post-metadata">

**Author:** ![HoOz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HoOz](https://forums.unrealengine.com/u/HoOz)\
**Post date:** [April 9, 2014, 11:21am UTC](https://forums.unrealengine.com/t/save-player-position/280055/11 "2014-04-09T11:21:41Z")

</div>

It should work,

you are not executing the last set node (set test)

EDIT:don’t forget to mark an answer to close the thread 🙂

---

<div class="post-metadata">

**Author:** ![mamoniem](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mamoniem/32/1194698_2.png) [@mamoniem](https://forums.unrealengine.com/u/mamoniem)\
**Post date:** [April 12, 2014, 3:49am UTC](https://forums.unrealengine.com/t/save-player-position/280055/12 "2014-04-12T03:49:43Z")

</div>

I made a tutorial which make it more clear and simple process to save and load, I hope it reply all your questions about that matter :

[https://www.youtube.com/watch?v=6l7uynUwm5M](https://www.youtube.com/watch?v=6l7uynUwm5M)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_21a58d97](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_21a58d97](https://forums.unrealengine.com/u/anonymous_user_21a58d97)\
**Post date:** [August 7, 2014, 2:50pm UTC](https://forums.unrealengine.com/t/save-player-position/280055/13 "2014-08-07T14:50:11Z")

</div>

Why are the image links dead?

---

<div class="post-metadata">

**Author:** ![mamoniem](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mamoniem/32/1194698_2.png) [@mamoniem](https://forums.unrealengine.com/u/mamoniem)\
**Post date:** [August 7, 2014, 3:07pm UTC](https://forums.unrealengine.com/t/save-player-position/280055/14 "2014-08-07T15:07:08Z")

</div>

I updated the image 🙂

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/0/2/d02a61f988f1f36beb602132bfb8b9a5d46fa10c.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_21a58d97](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_21a58d97](https://forums.unrealengine.com/u/anonymous_user_21a58d97)\
**Post date:** [August 7, 2014, 4:04pm UTC](https://forums.unrealengine.com/t/save-player-position/280055/15 "2014-08-07T16:04:38Z")

</div>

Thank you sir!By the way i am just watching your tutorial.may i ask a question?  
when you have successfully created your save file do you need anything more than just the “Load game from slot” command to load it?  
I have a setup like this. If player is overlapping checkpoint create a save game.  
If player is dead and the save game exists then " Load game from slot".  
Do you have any idea why it is not loading?  
[](https://dl.dropboxusercontent.com/s/9zqs2gpyggbzxaz/Screenshot%202014-08-07%2018.57.44.png)  
[](https://dl.dropboxusercontent.com/s/aofet93yhj2nvrj/Screenshot%202014-08-07%2018.59.57.png)  
Thank you!!  
EDIT: on second thought i must load my level and then set the spawning coordinates to my “Player start” volume so my player can start from there.Any directions on how to achieve this? 🙂

---

<div class="post-metadata">

**Author:** ![mamoniem](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mamoniem/32/1194698_2.png) [@mamoniem](https://forums.unrealengine.com/u/mamoniem)\
**Post date:** [August 7, 2014, 4:13pm UTC](https://forums.unrealengine.com/t/save-player-position/280055/16 "2014-08-07T16:13:47Z")

</div>

The node (Load Value From Slot) should be followed by some procedurals to use the value you have loaded. I can see now it is the end of the graph in your screen shot. So you need to cast the value after loading it & then use the value.

---

<div class="post-metadata">

**Author:** ![AURORA\_GAMEWORKS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AURORA\_GAMEWORKS](https://forums.unrealengine.com/u/AURORA_GAMEWORKS)\
**Post date:** [August 27, 2019, 11:38am UTC](https://forums.unrealengine.com/t/save-player-position/280055/17 "2019-08-27T11:38:57Z")

</div>

Similar to the video posted above by mamoniem, we’ve create a tutorial video on the subject. However our tutorial is completely specialised on the subject of player location saving, including things like making sure to not save player location whilst the player is in mid air, only saving once the player has landed on solid ground.

[https://www.youtube.com/watch?v=i-OJW1fZd4E](https://www.youtube.com/watch?v=i-OJW1fZd4E)
