How to Subtract certain amount of virtual currency from all the players by using segment and automation of schedule task. it is allowed only grant the virtual currency to all the players, How do i subtract certain amount of virtual currency from all the players. please help me to resolve this problem.
Answer by Brendan · Jun 21, 2018 at 06:47 AM
What is the feature you're trying to implement, exactly? If this is something you want to occur on a regular basis, we should discuss the details so that we can work out the best approach. If you want to do a blanket, one-time reduction in VC from all players, you could potentially use a Cloud Script, but there are likely better approaches. The more details we have about the design-level vision of what you're going for, the better we can advise you on this.
yes, i want to subtract 50 virtual currency from all the users for one time only.
Then I would recommend using a Cloud Script call as the action, and in that call, use SubtractUserVirtualCurrency.
There's an example Cloud Script in all newly created titles, as revision 1 in Automation->Cloud Script. It shows how to perform a range of tasks, including calling Server API methods.
There are also tutorials on using Cloud Scirpt here: https://api.playfab.com/docs/tutorials#landing-automation
Leaderboard related Questions 1 Answer
Custom data fields and tables 1 Answer
Scheduled task to update Store 1 Answer
Scheduled Task args through cloudscript Azure function 1 Answer
Email Templates variables 1 Answer