Is it possible to access the properties of virtual goods (e.g. price, etc) from the cloud code?
Best Answer
C
Customer Support
said
almost 7 years ago
Hi Stephane,
This is achievable in Cloud Code with SparkConfig, you can read more about it here. The following code will return the configuration for the Virtual Good I have created called "GOLD" (You could also use "getVirtualGoods()" to return all of the virtual goods if you wanted)
var virtualGood = Spark.getConfig().getVirtualGood("GOLD")
Spark.setScriptData("Config", virtualGood)
This is achievable in Cloud Code with SparkConfig, you can read more about it here. The following code will return the configuration for the Virtual Good I have created called "GOLD" (You could also use "getVirtualGoods()" to return all of the virtual goods if you wanted)
var virtualGood = Spark.getConfig().getVirtualGood("GOLD")
Spark.setScriptData("Config", virtualGood)
Stephane Lallee
Is it possible to access the properties of virtual goods (e.g. price, etc) from the cloud code?
Hi Stephane,
This is achievable in Cloud Code with SparkConfig, you can read more about it here. The following code will return the configuration for the Virtual Good I have created called "GOLD" (You could also use "getVirtualGoods()" to return all of the virtual goods if you wanted)
The response looks like this.
Thanks,
Liam
Customer Support
Hi Stephane,
This is achievable in Cloud Code with SparkConfig, you can read more about it here. The following code will return the configuration for the Virtual Good I have created called "GOLD" (You could also use "getVirtualGoods()" to return all of the virtual goods if you wanted)
The response looks like this.
Thanks,
Liam
-
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