I want My Game To Give Every Player Amount of items every X Time (2 Types)
- When They Login Today Next Day They Get 64 Wood Or Currency
- When They Don't Login They Get Daily Gift
(The Reset Time Will Be 0:00)
I want My Game To Give Every Player Amount of items every X Time (2 Types)
- When They Login Today Next Day They Get 64 Wood Or Currency
- When They Don't Login They Get Daily Gift
(The Reset Time Will Be 0:00)
Use of Scheduled tasks and segmentation can accomplish your need.
You could make a "lapsed Players" segment that has a login time above a certain amount. There can be a cloud trigger to do an action or run a cloud script every time they enter that segment.Also, scheduled tasks could run every day for an active players segment to give an item to everybody in that segment. However, it's probably better to have every player run a cloud script every time they log in, which checks the duration since their last login, rather than a daily scheduled task.
Please take a look at forum question about similar topic as well.
https://community.playfab.com/questions/78/205460028-Cloudscript-for-daily-reward.html
and here for the daily reward that uses regenerating currency.
https://community.playfab.com/idea/14304/add-ability-to-reset-virtual-currency-timer.html
Yes, I'll second that and add a bit more context. Bear in mind that Scheduled Tasks don't run at infinite speed. So the more players you're processing, the longer it's going to take. That can mean a significant lag between the first and the last, if you have a large player base. Also, taking actions for players that aren't coming back anymore isn't particularly useful. Taking the action when the player logs in will make sure that the gift is always there when they sign in, if enough time has passed.
3 People are following this question.