Loading a local save and replicating the results to all clients?
Hi guys, I'm currently I'm currently struggling to work out how to load a local save file and replicating the results to all other clients. To be more specific I have built a character customisation system which saves all information to a local file to be loaded when the players pawn is spawned, I am able to get the results loaded on to the character in single player fine, however I am a massive noob when it comes to multiplayer. So really the area that I need help with is how I would go about loading the local file to the players character and then replicate this to all other clients so that they see all of the customisations the other players have made. The customisation is added to the characters at spawn so I believe this would need some sort of RPC. I've tried creating a run on server custom event to the singleplayer script but that didn't work. If anyone knows where I'm going wrong it would be great if you could let me know :D
asked Nov 23 '16 at 03:39 PM in Blueprint Scripting
First set all the properties of your Custom Character BP that your local file sets to be replicated. Then create a Custom Event called "Set Custom Character Settings" in your Custom Character BP with Replicates set to "Run on Server" and "Reliable" checked. Add all of the properties in your local file as Inputs to the "Set Custom Character Settings" Custom Event. When you load the file on the client, call the "Set Custom Character Settings" custom event and send in the inputs. The properties will be set on the server and then replicate back to all the clients automatically.
If you have any questions or need more detail, let me know.
answered Nov 23 '16 at 04:01 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here