in my game , when i take the last turn i need to determine wich player have won the match , or even if the match has been a draw , so when every turn is done im doing this on taketurn last time called
function end_game(){ if (player_one_score > player_two_score){ challenge.winChallenge(player_one_id); }else if (player_one_score < player_two_score){ challenge.winChallenge(player_two_id); }else if(player_one_score == player_two_score){ challenge.drawChallenge(); } }
i think this will be doing great until i noticed that challenge.winChallenge() needs a Player to be passed , not just the ID.ç
I've searched all across the API reference and i coud'nt find how to acomplish that , so any help will be apreciated.
joaquin sanchez
in my game , when i take the last turn i need to determine wich player have won the match , or even if the match has been a draw , so when every turn is done im doing this on taketurn last time called
function end_game(){
if (player_one_score > player_two_score){
challenge.winChallenge(player_one_id);
}else if (player_one_score < player_two_score){
challenge.winChallenge(player_two_id);
}else if(player_one_score == player_two_score){
challenge.drawChallenge();
}
}
i think this will be doing great until i noticed that challenge.winChallenge() needs a Player to be passed , not just the ID.ç
I've searched all across the API reference and i coud'nt find how to acomplish that , so any help will be apreciated.
Thanks.
Hello joaquin sanchez,
As per GameSparks documentation you can use:
Regards,
Mantas
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstTech Support
Hello joaquin sanchez,
As per GameSparks documentation you can use:
Regards,
Mantas
joaquin sanchez
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2486 topics