Sign In Register

How can we help you today?

Start a new topic

How to delete a challenge or change its state?

I'd like my players to delete when they like their completed "challenges" (in GameSparks terms). I don't care whether challenges get actually deleted or just set to expired.

How can I do this?

 Hi Andrea,

You can't delete a challenge. It will remain in the challaengeInstance collection with the appropriate state. "EXPIRED", "COMPLETE" etc... You can read more about challenges and their states here. You can use some SparkChallenge calls in Cloud Code to manually determine the outcome of a challenge. You can set a winner with this call and you can declare a challenge a draw with this one.



Thanks for the reply,

I know I could set a winner or a drawn game but it's not really nice to do because nobody has really won, a player just abandoned. What I'm trying to do is to set a challenge in a state where is not complete and it's not running. It's "archived".

I think the only way to do this is to set a variable in ScriptData and check with that variable if the game has been deleted or not by the user so that it should not be shown in the completed games list I'd like to make.

Login to post a comment