We have a save system in place for players to be able to switch characters and skins. The problem is that when any client or the server change that value, it changes it for everyone.
I’m not sure if the problem is coming from the SaveGame blueprint or how we’re setting the values. The values themselves are not being told to replicate, but are across the entire network.
I’ll update if I find anything or if more information is needed,
Thanks.
Just to update this, We have a separate level where we are setting a boolean for team and an integer for character selection. However during a match when we load the save game it seems to load the server rather than the clients saved variables. Is there a way to make sure this stay local? we can upload screenshots of the relevant blueprints if that would help
Sounds like you’re not discriminating whether it is server or client, so the server loads theirs, then applies to the replicated values on replicated actors, which then replicate to the clients’s copies of those actors.
Holy cow this was an old post Yeah we had no idea what we were doing back then, rereading it, the issue was we had the server dictating the customization rather than having the client send an RPC with the proper customization. Cheers to you for answering this though, what a trip to the past
Hey! I realize this is an old post but I was hoping you could explain how you managed to fix this? Replication/multiplayer is still something I struggle with sometimes so it’d be awesome if I could get some tips on this
Replication is Server → Client.
Meaning, Vars set as replicated will not replicate changes made on the client to the server.
General process is to have the server make the change to a replicated variable, class etc. This is done via RPC or deterministic functionality.
The server should be making its own decisions about the value of a replicated variable.
For example take a character sprint mechanic. In a Client-side prediction setup (default CMC), the client presses Sprint and it locally makes a change to the CMC Max walk speed float. To get this change reflected on the server and eventually other client sims you RPC the server to sprint.
In both, there should be a conditional gateway that determines “IF” the character can sprint. By having the server execute the same logic it will be making its own choice as to whether the “Authoritative Proxy” can sprint.
Also in both cases there’s typically a bSprint or enum state that gets set for animation usage. Said variable would be replicated.
On Sims the state would be updated directly without logic conditional checks.