FAQs - Challenges

Can I save custom data on my Challenge?

Yes. You can use scriptData or privateData:

Spark.getChallenge(challengeInstanceId).setScriptData(name, value);
Spark.getChallenge(challengeInstanceId).setPrivateData(name, value);

Can I use Challenges as game lobbies?

Yes. Challenges can also be used as game lobbies, which players join publicly or privately.

Can the game master or challenger or host start a Challenge manually?

Yes. Do not specify a start time for the Challenge and create a log event that the host would invoke and which includes the following Cloud Code:


Can players in a Challenge send data to one another?

Yes. Players can use the playerIds referenced in the accepted array to send scriptMessages separately or use the ChatOnChallengeRequest to send a message to all players involved in the Challenge.

Can I remove a player from a Challenge?

Yes. You can use the following Cloud Code:


I understand that there are three types of Challenge. What are these different types?

Yes. There are three types of Challenge, which affects whether or not the Challenge can be listed to other players or joined by them:

What is the difference between the start time, the end time, and the expiry time of a Challenge?

For more details, please see the Understanding and Testing Challenges tutorial.

More Information? You can find tutorials for working with and setting up Challenges in the Multiplayer section.