Sign In Register

How can we help you today?

Start a new topic
Answered

Any way to adjust player achievements other than cloud code?

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

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!


Ahh...I see the "achievements" array in the "player" collection! - mayhaps I can manipulate it directly!

yup.  Sorry for the noise!

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

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...


thanks!

 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

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?)

Never mind - I am dumb. Spark.loadPlayer

Login to post a comment