# travel map: data loss on player controller?

**URL:** <https://forums.unrealengine.com/t/travel-map-data-loss-on-player-controller/732549>\
**Category:** Blueprint\
**Tags:** unreal-engine, Multiplayer, lobby, question\
**Created:** [December 20, 2022, 2:20pm UTC](https://forums.unrealengine.com/t/travel-map-data-loss-on-player-controller/732549 "2022-12-20T14:20:51Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![lukaoooo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lukaoooo](https://forums.unrealengine.com/u/lukaoooo)\
**Post date:** [December 20, 2022, 2:20pm UTC](https://forums.unrealengine.com/t/travel-map-data-loss-on-player-controller/732549/1 "2022-12-20T14:20:51Z")

</div>

the lobby is a map and there is a travel map to another map , in the lobby the player has the option to select a team and I use an RPC in the player controller with the variable of the chosen team , when the players go to the next map , the player controlle variables get lost? on postlogin in the game map game mode how to get this valid data?

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [December 20, 2022, 4:39pm UTC](https://forums.unrealengine.com/t/travel-map-data-loss-on-player-controller/732549/2 "2022-12-20T16:39:31Z")

</div>

The controller does not hold data on travel. Either save it to a savegame slot and reload the data on travel completion or, try passing it to the game instance (holds data between levels)

---

<div class="post-metadata">

**Author:** ![lukaoooo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lukaoooo](https://forums.unrealengine.com/u/lukaoooo)\
**Post date:** [December 20, 2022, 9:20pm UTC](https://forums.unrealengine.com/t/travel-map-data-loss-on-player-controller/732549/3 "2022-12-20T21:20:10Z")

</div>

how can i get this game instance data in postlogin?

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [December 20, 2022, 9:23pm UTC](https://forums.unrealengine.com/t/travel-map-data-loss-on-player-controller/732549/4 "2022-12-20T21:23:27Z")

</div>

Game instance is a static class so you can get it anywhere in the engine. Just type in “Get Game Instance” and you should get the node. Just be sure to cast it to your custom Game Instance that has the needed variables.

---

<div class="post-metadata">

**Author:** ![lukaoooo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lukaoooo](https://forums.unrealengine.com/u/lukaoooo)\
**Post date:** [December 20, 2022, 10:02pm UTC](https://forums.unrealengine.com/t/travel-map-data-loss-on-player-controller/732549/5 "2022-12-20T22:02:49Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/a/3/ba3907b91f77754e3f0c6000f6eb6df3f7e9a146.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/1/1/511057f6ccb5a18dde4ed7720b5f526a56f57ef9.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/3/f/13f7dcd346070432cd6512d0bc31dff1a49aee00.png)

I did it like this, even spawn in the right place, but the controller doesn’t possess

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [December 20, 2022, 10:10pm UTC](https://forums.unrealengine.com/t/travel-map-data-loss-on-player-controller/732549/6 "2022-12-20T22:10:16Z")

</div>

A) Only spawn character on server (During on post logon)  
B) After spawning the character pull out a pin from the output of spawn from class and type in possess. You should get the possess node. Pass into it the controller from on post logon.

---

<div class="post-metadata">

**Author:** ![lukaoooo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lukaoooo](https://forums.unrealengine.com/u/lukaoooo)\
**Post date:** [December 20, 2022, 10:15pm UTC](https://forums.unrealengine.com/t/travel-map-data-loss-on-player-controller/732549/7 "2022-12-20T22:15:04Z")

</div>

can you show me an example? did not quite understand

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [December 20, 2022, 10:18pm UTC](https://forums.unrealengine.com/t/travel-map-data-loss-on-player-controller/732549/8 "2022-12-20T22:18:41Z")

</div>

![possess](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/2/9/f29c31ed28906e127e70735dddb75a577a88769e.png)

---

<div class="post-metadata">

**Author:** ![lukaoooo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lukaoooo](https://forums.unrealengine.com/u/lukaoooo)\
**Post date:** [December 20, 2022, 10:27pm UTC](https://forums.unrealengine.com/t/travel-map-data-loss-on-player-controller/732549/9 "2022-12-20T22:27:07Z")

</div>

the problem is to get the team that the player chose that is stored in his own game instance

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [December 20, 2022, 10:28pm UTC](https://forums.unrealengine.com/t/travel-map-data-loss-on-player-controller/732549/10 "2022-12-20T22:28:39Z")

</div>

You could assign a unique hash per new controller and use that as a key to identify it in the game instance

---

<div class="post-metadata">

**Author:** ![lukaoooo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lukaoooo](https://forums.unrealengine.com/u/lukaoooo)\
**Post date:** [December 20, 2022, 10:30pm UTC](https://forums.unrealengine.com/t/travel-map-data-loss-on-player-controller/732549/11 "2022-12-20T22:30:11Z")

</div>

hash?

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [December 20, 2022, 10:33pm UTC](https://forums.unrealengine.com/t/travel-map-data-loss-on-player-controller/732549/12 "2022-12-20T22:33:06Z")

</div>

A unique id generated based on parameters of the controller. You could also use the index of the controllers array. There are many ways to do this.

---

<div class="post-metadata">

**Author:** ![lukaoooo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lukaoooo](https://forums.unrealengine.com/u/lukaoooo)\
**Post date:** [December 20, 2022, 10:38pm UTC](https://forums.unrealengine.com/t/travel-map-data-loss-on-player-controller/732549/13 "2022-12-20T22:38:13Z")

</div>

can you show me an example? because my problem is to get this to use in postlogin, I’ve tried everything

---

<div class="post-metadata">

**Author:** ![WizardCell](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/wizardcell/32/1194688_2.png) [@WizardCell](https://forums.unrealengine.com/u/WizardCell)\
**Post date:** [December 20, 2022, 10:55pm UTC](https://forums.unrealengine.com/t/travel-map-data-loss-on-player-controller/732549/14 "2022-12-20T22:55:34Z")

</div>

It’s funny that you opened a new thread asking the same question I answered you [yesterday](https://forums.unrealengine.com/t/pass-lobby-data-to-game-map/724953) and you affirmed that it worked (in both threads), though you was faced by a new irrelevant issue (pawns not being possessed correctly), which I basically told you to open a new thread for after you investigate it yourself with the [further info](https://forums.unrealengine.com/t/pass-lobby-data-to-game-map/724953/4) I provided you with which you need to look for. Looking at the code you posted in this thread I can tell you didn’t even fix what was noted to you at the end of my answer in the other thread, which 100% means you didn’t even got to read at least a few bits of the [compendium](https://wizardcell.com/unreal/persistent-data/) I provided you with. I’m not going to interfere any further, as you don’t seem to quite fully listen to advice, but my last advice would be to give my notes another visit and reconsider how you listen to advices in the future!

---

<div class="post-metadata">

**Author:** ![lukaoooo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lukaoooo](https://forums.unrealengine.com/u/lukaoooo)\
**Post date:** [December 20, 2022, 11:01pm UTC](https://forums.unrealengine.com/t/travel-map-data-loss-on-player-controller/732549/15 "2022-12-20T23:01:43Z")

</div>

I’m sorry Wizard Cell , I’m stupid and doing multiplayer is driving me crazy , I am very grateful for your comment
