Client tell server to update game settings?
So I'm creating a mutiplayer game.
When someone creates a new game, it is saved on their computer and then a session is started (this is the host).
Clients can then connect and join the game. Once they've joined, they must either create a new character for that world or select a previously created character.
In order for the server to keep up with how many characters have been created, there is a "SavedPlayerIndex" variable in the structure being used for the save file. Every time someone creates a new character, that player is assigned the current ID and then it updates the server telling it to increment the "SavedPlayerIndex" value. So when a new character is created, the value of that variable goes up.
Or at least, that is how it is supposed to work. I can't figure out how to do that. How does a client send a "message" to the server telling it to update its save game file and increment the "SavedPlayerIndex" variable?
asked Sep 23 '16 at 07:48 PM in Blueprint Scripting
I would have it so when the Character connects, the first thing it does is send the information of that Character to the server, using a Reliable Server function.
This might look like:
When the RecieveCharacter function is called, it could check against a Steam ID, Character ID, or whatever, to see if that Character has joined before and then decide what to do based on that.
answered Sep 28 '16 at 05:35 PM
ImVawx ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here