I'm testing some virtual good operations, and need a way to erase the users inventory, and re-grant these items. The best way I was able to figure out through the forums and API was through a cloud event "InventoryClear":
var player = Spark.getPlayer();
var myGoods = new SparkRequests.AccountDetailsRequest().Send().virtualGoods;
for(var i in myGoods){
player.useVGood(i, myGoods[i], "Test Purge");
}
Is this indeed the best way to do this? Is there a built in way to purge the users inventory? Thank you.
Best Answer
C
Customer Support
said
over 6 years ago
Hi Brett,
There is no default method for wiping a players Inventory of Virtual Goods, the way you are currently doing it would appear to be the quickest way to achieve this.
You can also do this manually in the Manage Screen. If you navigate there and click on the player search, find the player you are looking for and click edit on them you will be able to remove them there. Check the images below for reference.
Find the player you want to edit.
Here you can remove Virtual Goods, Achievements and edit a users Currency.
Hope that helps, if you have any further questions just let me know.
Thanks,
Liam
1 Comment
Customer Support
said
over 6 years ago
Answer
Hi Brett,
There is no default method for wiping a players Inventory of Virtual Goods, the way you are currently doing it would appear to be the quickest way to achieve this.
You can also do this manually in the Manage Screen. If you navigate there and click on the player search, find the player you are looking for and click edit on them you will be able to remove them there. Check the images below for reference.
Find the player you want to edit.
Here you can remove Virtual Goods, Achievements and edit a users Currency.
Hope that helps, if you have any further questions just let me know.
Brett Unzaga
I'm testing some virtual good operations, and need a way to erase the users inventory, and re-grant these items. The best way I was able to figure out through the forums and API was through a cloud event "InventoryClear":
Is this indeed the best way to do this? Is there a built in way to purge the users inventory? Thank you.
Hi Brett,
There is no default method for wiping a players Inventory of Virtual Goods, the way you are currently doing it would appear to be the quickest way to achieve this.
You can also do this manually in the Manage Screen. If you navigate there and click on the player search, find the player you are looking for and click edit on them you will be able to remove them there. Check the images below for reference.
Find the player you want to edit.
Here you can remove Virtual Goods, Achievements and edit a users Currency.
Hope that helps, if you have any further questions just let me know.
Thanks,
Liam
Customer Support
Hi Brett,
There is no default method for wiping a players Inventory of Virtual Goods, the way you are currently doing it would appear to be the quickest way to achieve this.
You can also do this manually in the Manage Screen. If you navigate there and click on the player search, find the player you are looking for and click edit on them you will be able to remove them there. Check the images below for reference.
Find the player you want to edit.
Here you can remove Virtual Goods, Achievements and edit a users Currency.
Hope that helps, if you have any further questions just let me know.
Thanks,
Liam
1 person likes this
-
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