Set Basic Presence #

A basic presence allows a player to appear “online” or “away” to their friends. To learn about setting rich values, see Set Rich Presence.

When a user first logs on, no presence status exists. Upon logout, crash, or disconnect, Pragma will automatically remove the presence status.

Set status as online #

To set a user’s presence status to “online”, thus making them appear online to members of their friend list, use the Presence API SetAsOnline method:

Player->PresenceApi().SetAsOnline(
  const FOnCompleteDelegate& OnComplete
);
Player.PresenceApi.SetAsOnline(
  CompleteDelegate onComplete
);

If the user does not currently have a basic presence status, this method creates one. Otherwise, it updates the current basic presence value. If the user does not currently have a rich presence status, this method creates an empty RichPresence ext.

Set status as away #

To set a user’s presence to “away”, thus making them appear away to members of their friend list, use the Presence API SetAsAway method:

Player->PresenceApi().SetAsAway(
  const FOnCompleteDelegate& OnComplete
);
Player.PresenceApi.SetAsAway(
  CompleteDelegate onComplete
);

If the user does not currently have a basic presence status, this method creates one. Otherwise, the call updates the current basic presence value. If the user does not currently have a rich presence status, this method creates an empty RichPresence ext.

Related events

Related errors