Get the currency award type and amount with GameSparks.Api.Responses.ListAchievementsResponse
O
Olivier Vezina
started a topic
about 5 years ago
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)
Is there a way for me to also get the currency award of each achievement from the client?
Thanks!
Olivier
Best Answer
C
Customer Support
said
about 5 years ago
Hi Olivier,
In order to do this you'll need to create an event to obtain and return the achievement list through cloud code:
Olivier Vezina
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)
Is there a way for me to also get the currency award of each achievement from the client?
Thanks!
Olivier
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
Customer Support
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
-
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 2487 topics