Party SDK and Events #
Party Service SDK Methods #
The table below contains a list of the SDK methods relevant to the Party service. These methods are available via the GameLoopApi
.
Call | section |
---|---|
AssignPartyLeader | Assigns a party leader |
CreateParty | Creates a new party |
EnterMatchmaking | Allows party leader to enter the party into matchmaking once all players are ready |
GetLocalPartyPlayer | Returns the current session’s party player |
GetParty | Returns the associated party object |
GetPartyInviteByInviteId | Returns the party invite according to the provided invite id |
GetPartyInviteByInviterId | Returns the party invite according to the provided id of the inviter |
GetPendingPartyInvites | Returns pending received invites |
HasParty | Returns true if the player has an associated party object |
IsInParty | Returns true if the player has an associated party object and the session’s party ID attribute is present |
IsLeaderOfParty | Returns true if provided player ID is the leader of the party |
JoinPartyWithInviteCode | Allows player to join a party using an invite code |
JoinPartyWithId | Allows player to join a party using a party ID |
LeaveParty | Allows a player to leave a party voluntarily |
KickPlayerFromParty | Removes a player from a party involuntarily |
RespondToPartyInvite | Allows player to accept or reject another player’s invite to a party |
SendPartyInvite | Sends a party invite to a specific player |
SessionNotInParty | Returns true if the session’s party ID attribute is null |
SetPartyPlayerGameServerZoneToPing | Updates the GameServerZoneToPing value for the party |
SetPartyPreferredGameServerZones | Updates the GameServerZones value for the party |
SetPartyPlayerReady | Sets the player’s Ready value |
UpdatePartyPlayer | Updates custom party player information when in a party |
UpdateParty | Updates custom party information |
The SDK calls invoke various Party Plugin methods through Party service RPCs. For a list of Party service RPCs, see the PartyService reference page
Party Service Bindable Events #
There are several party-related events that player clients can listen to. The following table contains bindable events relevant to the Party service, along with associated descriptions of when the event is triggered.
The following events are handled by the player client.
Unreal | Unity | Trigger |
---|---|---|
FPartyEvent OnJoinedParty; | public event Action<IParty> OnjoinedParty; | A player joins a party. |
FPartyEvent OnPartyChanged; | public event Action<IParty> OnPartyDataChanged; | Party information changes, including creation and destruction Note: All other On* events fire in addition to this one, so developers will need to account for handling multiple events at once. |
FInviteCodeEvent OnPartyInviteCodeChanged; | public event Action<string> OnPartyInviteCodeChanged; | A new invite code is made for the party. |
FExtBroadcastPartyEvent OnExtBroadcastPartyChanged; | public event Action<ExtBroadcastParty> OnExtBroadcastPartyChanged; | The public ext party selections change. |
FPreferredGameServerZonesEvent OnPartyPreferredGameServerZonesChanged; | public event Action<List<string>> OnPartyPreferredGameServerZonesChanged; | A party’s preferred game server zones change. |
FPartyLeftEvent OnLeftParty; | public event Action OnLeftParty; | Your player leaves the party voluntarily. |
FRemovedFromPartyEvent OnRemovedFromParty; | public event Action<RemovalReason> OnRemovedFromParty; | Your player leaves a party for reasons outside of your control. |
FPlayerEvent OnPlayerJoinedParty; | public event Action<IPartyPlayer> OnPlayerJoinedParty; | A new player joins the party. All players in the party can handle this event. |
FPlayerListEvent OnPartyPlayersChanged; | public event Action<IReadOnlyList<IPartyPlayer>> OnPartyPlayersChanged; | One or more players join or leave the party. Will fire if the number stays the same (e.g. +1, -1 in one update). |
FPlayerEvent OnPartyPlayerDataChanged; | public event Action<IPartyPlayer> OnPartyPlayerDataChanged; | Any player information changes. |
FExtPrivatePlayerEvent OnExtPrivatePlayerChanged; | public event Action<ExtPrivatePlayer> OnExtPrivatePlayerChanged; | A player’s private selections changes. |
FPlayerLeftEvent OnPlayerLeftParty; | public event Action<PragmaId> OnPlayerLeftParty; | A player leaves the party. |
FInviteListEvent OnPartyInvitesChanged; | public event Action<IReadOnlyList<PartyInvite>> OnPartyInvitesChanged; | The invites list is changed. |
FInviteEvent OnPartyInviteReceived; | public event Action<PartyInvite> OnPartyInviteReceived; | A party invite is received from another player. |
FInviteIdEvent OnPartyInviteRevoked; | public event Action<PragmaId> OnPartyInviteRevoked; | A party invite is revoked, such as when pending invites are canceled by a game starting a match. |
FInviteIdEvent OnPartyInviteAccepted; | public event Action<PragmaId> OnPartyInviteAccepted; | An invitee accepts the invite. Only inviters can handle this event. |
FInviteIdEvent OnPartyInviteDeclined; | public event Action<PragmaId> OnPartyInviteDeclined; | An invitee declines the invite. Only inviters can handle this event. |
FUpdateClientVersionEvent OnGameClientVersionUpdateRequired; | public event Action OnGameClientVersionUpdateRequired; | The player client needs to update their GameClientVersion . |
FPartyClientVersionMismatchEvent OnPartyClientVersionMismatch; | public event Action OnPartyClientVersionMismatch; | Cannot find a game server version that is compatible with every player in the party. |