I’m currently developing a multiplayer game. Player chooses character, weapon loadout, outfit etc. in main menu and saves all variables in savegame object. Then player searches for a lobby to join, upon finding said lobby the gamemode then assigns a playercontroller, gets savegame data from playerstate, changes parameters of pawn, spawns pawn and possesses it.
When Play in new editor window with players set to 4, i am able to select different characters and spawn them in the lobby no problem, however when testing multiplayer through steam all connecting players get the hosts character.
Ive been banging at this for a few days now and understand that somehow the clients are accessing the server savegame on spawn. But how is this possible after ive set the saved data in playerstate on construction if the playerstate blueprint.
I’ve also tried creating a blueprint for each character you can select and switch inside gamemode which to spawn.
Ive tried rpc events inside ps and pc to send save data to gamemode.
Ive even tried running an on tick event in the pawn blueprint to set the character variable (replicated) each frame.
Nothing works when testing on two different pc’s running steam
any assistance would be appreciated.
Do the variables in the playerstate also need replication or is there a better way to handle this entirely?