Any way to adjust player achievements other than cloud code?
J
Jeff Amiel
started a topic
almost 5 years ago
None of the external (NOSQL/Game) seem to allow the manipulation of player achievements (granting or removing). Am I missing something or is the only way by virtue of cloud code?
Best Answer
J
Jeff Amiel
said
almost 5 years ago
I was attempting to grant some achievements to a group of folks remotely (from the server side of things).
This was carefully crafted - I didn't want the 'rewards' that went along with the achievements - nor the notifications to the players.
(I am/was testing some pre-population of data to test some client-side interactions)
I ended up using both methods with similar (positive) results...
Ahh...I see the "achievements" array in the "player" collection! - mayhaps I can manipulate it directly!
J
Jeff Amiel
said
almost 5 years ago
yup. Sorry for the noise!
Customer Support
said
almost 5 years ago
Hi Jeff,
The player collection is a system critical one so I wouldn't recommend altering it manually in the manner you are currently doing. Is there a reason why you're trying to do it this way ? Using the SparkPlayer calls would be the recommended way to change the details on a player. Let us know what you're trying to achieve here and we can advise you how to best go about it.
Thanks,
Liam
J
Jeff Amiel
said
almost 5 years ago
Answer
I was attempting to grant some achievements to a group of folks remotely (from the server side of things).
This was carefully crafted - I didn't want the 'rewards' that went along with the achievements - nor the notifications to the players.
(I am/was testing some pre-population of data to test some client-side interactions)
I ended up using both methods with similar (positive) results...
It isnt a good idea to go modifying the player-docs directly as i can cause instability in the player collection
J
Jeff Amiel
said
over 4 years ago
Sorry for late post here - but the addAchievement api call is only for a SparkPlayer - which (as far as I know) represents ONLY the current connceted player, correct? Could you get a reference to other players (addAchiecement for multiple players in same cloud code?)
Jeff Amiel
None of the external (NOSQL/Game) seem to allow the manipulation of player achievements (granting or removing). Am I missing something or is the only way by virtue of cloud code?
I was attempting to grant some achievements to a group of folks remotely (from the server side of things).
This was carefully crafted - I didn't want the 'rewards' that went along with the achievements - nor the notifications to the players.
(I am/was testing some pre-population of data to test some client-side interactions)
I ended up using both methods with similar (positive) results...
thanks!
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstJeff Amiel
Ahh...I see the "achievements" array in the "player" collection! - mayhaps I can manipulate it directly!
Jeff Amiel
yup. Sorry for the noise!
Customer Support
Hi Jeff,
The player collection is a system critical one so I wouldn't recommend altering it manually in the manner you are currently doing. Is there a reason why you're trying to do it this way ? Using the SparkPlayer calls would be the recommended way to change the details on a player. Let us know what you're trying to achieve here and we can advise you how to best go about it.
Thanks,
Liam
Jeff Amiel
I was attempting to grant some achievements to a group of folks remotely (from the server side of things).
This was carefully crafted - I didn't want the 'rewards' that went along with the achievements - nor the notifications to the players.
(I am/was testing some pre-population of data to test some client-side interactions)
I ended up using both methods with similar (positive) results...
thanks!
Customer Support
Hey Jeff,
We have an api call for this.
https://docs.gamesparks.net/documentation/cloud-code-api/spark-cloud-code-api/sparkplayer#addAchievement
It isnt a good idea to go modifying the player-docs directly as i can cause instability in the player collection
Jeff Amiel
Sorry for late post here - but the addAchievement api call is only for a SparkPlayer - which (as far as I know) represents ONLY the current connceted player, correct? Could you get a reference to other players (addAchiecement for multiple players in same cloud code?)
Jeff Amiel
Never mind - I am dumb. Spark.loadPlayer
-
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