Hi everyone, as the title says , I am stuck with the correct replication of a simple variable over the session.
To be more specific , I’m trying to use the GI to creare and store a Player Name on Event Init, than I want to set another variable on my Player State using the function “Get Game Instance” on PS Begin Play.
I created a simple Host/Join session without a dedicated server (Up to 3 player in total), and I have a EventOnPostLogin on my GM that collects Player controller and their Player States.
When I try to print all the names from my PS array, I only get 3 times the name of the server.
I tried searching online, but everyone speaks about the GI as a independent body, that only exist on Client , so why the one that host the session, replicates it’s name on all others?
Yeah, I checked the ue docs , but they just tell me which class I need to use, but not how to properly use them.
In theory I understand everything, in practice I’m having problems.
I came to a conclusion, If I have a non-dedicated server, I can’t pass my variable directly from Game Instance in match, because the Server Game Instance will interfere.
Somehow I managed to get it to work using the Save Game to get my variable and the GI to save save them.
Would get rid of the Delay node OnPostLogin as when 2 player try to connect at the same time within that 0.5 seconds you will miss that players (or both) OnPostLogin event.