Sign In Register

How can we help you today?

Start a new topic
Answered

Get the currency award type and amount with GameSparks.Api.Responses.ListAchievementsResponse

I have 3 achievements set up with their ShortCode, their Name, their Description and their Currency Awards,

I have 2 types of currency and each achievement can give up to X amount of Y type of currency.


On the client side, I'm trying to display a list of all the achievements with their name, their description and their currency award but it looks like the GSData doesn't give me an option to see the currency award (as seen in the picture below)

image


Is there a way for me to also get the currency award of each achievement from the client?

Thanks!

Olivier


Best Answer

Hi Olivier,


In order to do this you'll need to create an event to obtain and return the achievement list through cloud code:


Spark.setScriptData("achievements", Spark.getConfig().getAchievements());


This will return all of your games achievements, complete with currency awards.


Regards,

Vinnie

1 Comment

Answer

Hi Olivier,


In order to do this you'll need to create an event to obtain and return the achievement list through cloud code:


Spark.setScriptData("achievements", Spark.getConfig().getAchievements());


This will return all of your games achievements, complete with currency awards.


Regards,

Vinnie

Login to post a comment