# Need help with saving and loading the position of the player

**URL:** <https://forums.unrealengine.com/t/need-help-with-saving-and-loading-the-position-of-the-player/312429>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE4, question, Blueprint\
**Created:** [March 24, 2015, 8:23pm UTC](https://forums.unrealengine.com/t/need-help-with-saving-and-loading-the-position-of-the-player/312429 "2015-03-24T20:23:23Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_2a759a48](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2a759a48](https://forums.unrealengine.com/u/anonymous_user_2a759a48)\
**Post date:** [March 24, 2015, 8:23pm UTC](https://forums.unrealengine.com/t/need-help-with-saving-and-loading-the-position-of-the-player/312429/1 "2015-03-24T20:23:23Z")

</div>

Hello erveryone,

for quite some time I’m working on a endless runner game like the one created in the ue 4 tutorial series  
[Endless Runner with Blueprints](https://www.youtube.com/watch?v=yS-yQfo0lc0&list=PLZlv_N0_O1gbY4FN8pZuEPVC9PzQThNn1&index=1) Everything went fine so far until I stumbled upon the problem how to save and load the players position. So I wanted to implement that when the player stops playing the game and he is going to play again he could carry on at the position where he stopped by pressing a button in a menu created with a widget blueprint. So I have watched several tutorials, but in most cases it was only shown how to save some integers to print some numbers at the end and unfortunately I wasn’t able to assign it to get my player position. Eventually I found that usefull video [Unreal Engine 4 Tutorials Gameplay Logic](https://www.youtube.com/watch?v=92s7AUeBS3c) through which I was able to save the position of the player and load it by pressing any key (in my case Tab) on the keyboard or mouse. But as I mentioned before I wanted to get that player position through pressing a button in a menu to resume the game, but somehow I’m not able to get that working.

All in all I’m relatively new to working with blueprints and the problem with saving and loading data got me going nuts, so I hope someone could explain me how to get that nasty player position so I can implement it to my menu.  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![alperenakyuz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alperenakyuz](https://forums.unrealengine.com/u/alperenakyuz)\
**Post date:** [March 25, 2015, 6:25am UTC](https://forums.unrealengine.com/t/need-help-with-saving-and-loading-the-position-of-the-player/312429/2 "2015-03-25T06:25:13Z")

</div>

This is a very easy task. I’ll post you an example when I get in front of my pc (on he phone right now). Woul you prefer a UMG example?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2a759a48](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2a759a48](https://forums.unrealengine.com/u/anonymous_user_2a759a48)\
**Post date:** [March 25, 2015, 3:37pm UTC](https://forums.unrealengine.com/t/need-help-with-saving-and-loading-the-position-of-the-player/312429/3 "2015-03-25T15:37:31Z")

</div>

Oh that would be rly awesome. Yes it would be great if it would be able to access it through a UMG bp since I made my menu with UMG, too

---

<div class="post-metadata">

**Author:** ![alperenakyuz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alperenakyuz](https://forums.unrealengine.com/u/alperenakyuz)\
**Post date:** [March 25, 2015, 3:50pm UTC](https://forums.unrealengine.com/t/need-help-with-saving-and-loading-the-position-of-the-player/312429/4 "2015-03-25T15:50:15Z")

</div>

Ok, I’m assuming you created your custom save object etc., right?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2a759a48](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2a759a48](https://forums.unrealengine.com/u/anonymous_user_2a759a48)\
**Post date:** [March 25, 2015, 3:55pm UTC](https://forums.unrealengine.com/t/need-help-with-saving-and-loading-the-position-of-the-player/312429/5 "2015-03-25T15:55:56Z")

</div>

yes I did

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2a759a48](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2a759a48](https://forums.unrealengine.com/u/anonymous_user_2a759a48)\
**Post date:** [March 25, 2015, 3:58pm UTC](https://forums.unrealengine.com/t/need-help-with-saving-and-loading-the-position-of-the-player/312429/6 "2015-03-25T15:58:41Z")

</div>

should i show you my blueprints?

---

<div class="post-metadata">

**Author:** ![alperenakyuz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alperenakyuz](https://forums.unrealengine.com/u/alperenakyuz)\
**Post date:** [March 25, 2015, 6:58pm UTC](https://forums.unrealengine.com/t/need-help-with-saving-and-loading-the-position-of-the-player/312429/7 "2015-03-25T18:58:28Z")

</div>

No need. I’ll just do it very quickly.

---

<div class="post-metadata">

**Author:** ![alperenakyuz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alperenakyuz](https://forums.unrealengine.com/u/alperenakyuz)\
**Post date:** [March 25, 2015, 7:08pm UTC](https://forums.unrealengine.com/t/need-help-with-saving-and-loading-the-position-of-the-player/312429/8 "2015-03-25T19:08:19Z")

</div>

I created two buttons called Save Button and Load Button inside the UMG editor.

Here are the screenshots. They are pretty self-explanatory, but let me know if you have more questions.

 ![35904-click+here.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/9/6/a96388a4bfbbd4f1f9cf19acaa8e2fef61af0004.png)

.

 ![35905-blueprint.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/d/5/8d55fd37c9ec0593cfa564d51b6ada4d29673bab.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2a759a48](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2a759a48](https://forums.unrealengine.com/u/anonymous_user_2a759a48)\
**Post date:** [March 25, 2015, 7:59pm UTC](https://forums.unrealengine.com/t/need-help-with-saving-and-loading-the-position-of-the-player/312429/9 "2015-03-25T19:59:12Z")

</div>

thanks for your quick respone. I have one question. Did you set up the vector variable “position” inside bp save game or did you create it in third person character? I made the variable in save game bp, but i cannot connect “cast to thirdpersoncharacter” with the variable position.

 ![35900-bp.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/b/c/8bc90db44a14480ccf30603b066be72cbf84bdff.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2a759a48](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2a759a48](https://forums.unrealengine.com/u/anonymous_user_2a759a48)\
**Post date:** [March 25, 2015, 9:34pm UTC](https://forums.unrealengine.com/t/need-help-with-saving-and-loading-the-position-of-the-player/312429/10 "2015-03-25T21:34:18Z")

</div>

thanks for your quick respone. I have one question. Did you set up the vector variable “position” inside bp save game or did you create it in third person character? I made the variable in save game bp, but i cannot connect “cast to thirdpersoncharacter” with the variable position.

---

<div class="post-metadata">

**Author:** ![alperenakyuz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alperenakyuz](https://forums.unrealengine.com/u/alperenakyuz)\
**Post date:** [March 26, 2015, 12:05pm UTC](https://forums.unrealengine.com/t/need-help-with-saving-and-loading-the-position-of-the-player/312429/11 "2015-03-26T12:05:45Z")

</div>

I created the “position” variable both for the save game and the thirdprsoncharacter. It does not ncessarily have to be created for the character though, you can just get its location via the get actor location node. Depends on how you feel like doşng it actually…

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2a759a48](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2a759a48](https://forums.unrealengine.com/u/anonymous_user_2a759a48)\
**Post date:** [March 27, 2015, 7:38pm UTC](https://forums.unrealengine.com/t/need-help-with-saving-and-loading-the-position-of-the-player/312429/12 "2015-03-27T19:38:12Z")

</div>

Now with get actor location node everything works fine, thanks to you 🙂

---

<div class="post-metadata">

**Author:** ![alperenakyuz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alperenakyuz](https://forums.unrealengine.com/u/alperenakyuz)\
**Post date:** [March 30, 2015, 9:21pm UTC](https://forums.unrealengine.com/t/need-help-with-saving-and-loading-the-position-of-the-player/312429/13 "2015-03-30T21:21:45Z")

</div>

Cheers, glad that worked. Would you mind accepting/upvoting the answer so it shows as resolved? Thx

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2a759a48](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2a759a48](https://forums.unrealengine.com/u/anonymous_user_2a759a48)\
**Post date:** [March 31, 2015, 8:21pm UTC](https://forums.unrealengine.com/t/need-help-with-saving-and-loading-the-position-of-the-player/312429/14 "2015-03-31T20:21:56Z")

</div>

Sure, did it

---

<div class="post-metadata">

**Author:** ![ale929\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ale929\_1](https://forums.unrealengine.com/u/ale929_1)\
**Post date:** [May 5, 2015, 2:22pm UTC](https://forums.unrealengine.com/t/need-help-with-saving-and-loading-the-position-of-the-player/312429/15 "2015-05-05T14:22:33Z")

</div>

Alperenakyuz, how did you create that “Target → Position” node?

---

<div class="post-metadata">

**Author:** ![savior44](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@savior44](https://forums.unrealengine.com/u/savior44)\
**Post date:** [August 13, 2015, 11:01am UTC](https://forums.unrealengine.com/t/need-help-with-saving-and-loading-the-position-of-the-player/312429/16 "2015-08-13T11:01:07Z")

</div>

Hi;

How did you create that “Target → Position” node?

Thanks.

---

<div class="post-metadata">

**Author:** ![Keppu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Keppu](https://forums.unrealengine.com/u/Keppu)\
**Post date:** [November 16, 2015, 12:34am UTC](https://forums.unrealengine.com/t/need-help-with-saving-and-loading-the-position-of-the-player/312429/17 "2015-11-16T00:34:25Z")

</div>

“How did you create that “Target → Position” node?”

I wish to know this too.

---

<div class="post-metadata">

**Author:** ![J\_Issa1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@J\_Issa1](https://forums.unrealengine.com/u/J_Issa1)\
**Post date:** [December 6, 2015, 8:00pm UTC](https://forums.unrealengine.com/t/need-help-with-saving-and-loading-the-position-of-the-player/312429/18 "2015-12-06T20:00:57Z")

</div>

In the “PositionSave” blueprint, he created a Vector variable called Position. Then from then cast you need to type:

“get Position”

This will give you the node you want.

---

<div class="post-metadata">

**Author:** ![Keppu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Keppu](https://forums.unrealengine.com/u/Keppu)\
**Post date:** [December 6, 2015, 9:18pm UTC](https://forums.unrealengine.com/t/need-help-with-saving-and-loading-the-position-of-the-player/312429/19 "2015-12-06T21:18:56Z")

</div>

Oh I see. The variable is in the character blueprint. Thanks mate, I learned something new today! 🙂
