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?
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)
how can i get this game instance data in postlogin?
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.
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.
can you show me an example? did not quite understand
the problem is to get the team that the player chose that is stored in his own game instance
You could assign a unique hash per new controller and use that as a key to identify it in the game instance
hash?
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.
can you show me an example? because my problem is to get this to use in postlogin, I’ve tried everything
It’s funny that you opened a new thread asking the same question I answered you yesterday 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 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 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!
I’m sorry Wizard Cell , I’m stupid and doing multiplayer is driving me crazy , I am very grateful for your comment