gpgs.multiplayer.turnbased.send()

Type Function
Return value none
Revision Release 2024.3703
Keywords Google Play Games Services, game network, gpgs, multiplayer, turn-based, send
See also gpgs.multiplayer.turnbased
gpgs.multiplayer
gpgs.*

Overview

Indicates that a participant has finished his turn and optionally sends match results to specified participants. For this call, you must indicate who will take the next turn.

Syntax

gpgs.multiplayer.turnbased.send( params )
params (required)

Table. Contains parameters for the call — see the next section for details.

Parameter Reference

The params table contains parameters for the call.

matchId (required)

String. The multiplayer match ID.

pendingParticipantId (optional)

String. Participant who will have the next turn.

isPendingAutomatch (optional)

Boolean. Whether to wait for additional auto-matched players to take the next turn (if possible).

payload (optional)

String. The match data to send to other participants. This has a size limit as noted in gpgs.multiplayer.getLimits().

listener (optional)

Listener. Listener function which receives a send event.

results (optional)

Array. Populate with result table elements as defined in the next section. Note that the results reported here should be final — if results reported later conflict with these values, the returned value will indicate a conflicted result. This is most useful for cases where a participant knows their results early, for example a single elimination game where participants are eliminated but the game continues.

Results Parameters

The results array can be populated with child tables, each containing individual participant details:

participantId (required)

String. Participant to send the result to.

result (optional)

String. The result of the match. Can be either "disagreed", "disconnect", "loss", "tie", "win", or "none". Default is "none".

placing (optional)

Number. The place/rank the participant has earned.