🧑🤝🧑Parties
Last updated
Last updated
All built in party features have been permanently disabled in V31. As such, the content on this page is no longer accurate.
Note that the tools demonstrated in this page are accessible from MSquared v21
Experimental - Customers are encouraged to test and use this feature in their experiences, but it may still require some additional support
In order to use the M2 default flow for inviting players to party, the following live config settings will need to be enabled: - Interaction.EnableP2PInteractions - Interaction.EnableP2PPartyInteractions - Social.EnableParties
The default flow provides an example of how to interact with the party component to facilitate inviting another player to your party. It can be found in BP_M2_PlayerCharacterBase
beginning with OnP2PButtonOptionRequested
.
ProcessInviteToPartyOptionSelected
shows how we can send a request to create a party, setting up a call-back to handle the response.
This call-back could be used to handle errors and the logic to run upon success.
Once we have a valid party to invite some one to, we send a client RPC to the target.
In order to be notified for receipt of invitation you can bind to OnPartyInviteReceived
as seen in WBP_PartyInviteNotification
.
Once an invite has been accepted / declined, the respective function can be called on the local players PartyComponent.
BPMC_PartyComponent
gives an example of how these events, coupled with PartyInviteReceived
can be used to track states and manipulate invites. The "Handle" functions can be overridden to provide different functionality.
AcceptPartyInvite will join the provided party ID via the backend API, and send a client RPC to the instigator to inform them of the acceptance. Decline will similarly send a client RPC to notify the instigator.
To hook up notifications to a target player accepting / declining your invitation, bind to OnPartyInviteAccepted
& OnPartyInviteDeclined
respectively in the PartyComponent
.
To get the party members in your current party, you can use the GetPartyMembers
function.