Sign In Register

How can we help you today?

Start a new topic

Post random scores to challenge

Hi There,

In our game we have a challenge for upto 10 people. When Challenge status turn to "RUNNING" and there are less then 10 people in the challenge, we need to post dummy scores to challenge to fill the board up to 10. For ex. 7 people are playing we need to post 3 random scores. How can we manage this system? 


Kind Regards

1 Comment

Hey Selcan,

Each time you take a turn in a challenge, you have the option to run a cloud-code script (you can check out a tutorial on that here).
You can then use the SparkChallenge api to check how many players are in the challenge and then run some of your own code to add data to the turns if there are not enough players.

Hope that helps,
Sean

 

Login to post a comment