SparkParticipant

Provides the details of a participant in a match

e.g.

var participant = Spark.getMultiplayer().loadMatch(matchId).getParticipants[0];

getPlayer

signature getPlayer()

returns SparkPlayer

validity All Scripts

returns

The SparkPlayer this participant represents

example

var player = participant.getPlayer()

getPeerId

signature getPeerId()

returns number

validity All Scripts

returns

The peerId of this participant

example

var peerId = participant.getPeerId()

getAccessToken

signature getAccessToken()

returns string

validity All Scripts

returns

An accessToken for this participant to connect to the realtime server

example

var accessToken = participant.getAccessToken()
Did this page help you? Please enter your feedback below. For questions about using this part of the platform, please contact support here