Custom Party Variables
Last updated
Last updated
You may want to add custom variables to party players. Here are a few tips on how to go about implementing this into the party framework:
Create a new blueprint from the KronosPartyPlayerState
class and add variables to it that you want to replicate to other players. Make sure that the variables are set to replicate. Use this class for data storage only. Do not add RPC functions to this class because they will not work.
Create a new blueprint from the KronosPartyClient
class. We are going to use this class whenever we want to modify a replicated variable in the party player state.
Inside this blueprint add custom "set" events for your replicated variables (e.g. "SetMyCustomVariable"). Make this event a reliable server RPC by setting its replication to "Run on Server" and enabling "Reliable". Use this event to modify its corresponding variable in the party player state on server side. After the variable is changed on server side, it will replicate down to all players.
Now go to Project Settings -> Kronos Matchmaking and change the "Party Client Class" and "Party Player State Class" to your custom blueprints.