Hello everyone. I’m having trouble with loading client variables (which are saved before joining a session) after joining a session. I’ll explain my problem first.
I’m writing a 2 player fighting game with blueprints.
I saved client’s name, hero name, etc variables into a gameState blueprint before joining the session.
But after joining the session, when I load them back, all the variables saved in the gameState are reset.
Can anyone help me how to save variables of client ( which are set before joining session ) and load them after joining session.
You should save those kind of variables in Game Instance. This object does not get reset after map changing .
Also, On Post Login you could send request to client, with name and stuff and client would send it back to server when request received.
Thank you for your answer. I’ve tried with game instance but it doesn’t succeed. I’ll explain what is happening exactly.
For example, we have two players, so
Server has a game instance where name = “gg”.
Another player (before joining session) also has a game instance where name = “John”
but after joining session, there is only one game instance left and whenever I called a variable from game instance, it answers “gg”.
I really want to know is how can I save the variable set to “John” and load it after joining session. Or any other ways to solve such problems.
That’s weird. So, save game maybe?
After Selecting name and stuff, save it to file and load the file after joining session…
no, GI persist on the client, add delay after PostLogin controller event