question

laurentiumarianivan avatar image
laurentiumarianivan asked

Rewarding players with consumable items after each X games (or other metrics)

Hello!

I want to reward my players with consumable items from my catalog after a condition is fulfilled. Some examples of conditions are:
  • after X games played (or won or lost)
  • on levelup
  • on a selected day of the week (eg each Monday).

How would the general flow look like and what would be the best approach, so if in the future I want to have more conditions I can easily add them?

Thanks a lot!

Player DataPartner Add-onsPlayer Inventory
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Xiao Zha avatar image
Xiao Zha answered

There is no uniform reward setting scheme, and you should use different reward settings according to different situations. Below are some examples of methods you can mix and match.

>> after X games played (or won or lost)

You can use statistics and Rules to achieve reward methods. You can store the value in statistics and set the event type in the rule to com.playfab.player_statistic_changed and set the condition StatisticName to the statistics you create and set the action to execute cloud script to check the statistic you want, then the distribution of rewards is determined based on the statistics.

>> on level up

You can use Rules to achieve it. You can call write player event in your level up function to write an event to trigger the actions you set in the rule.

>> on a selected day of the week (eg each Monday).

You can use Scheduled Tasks to achieve it. You can set the SCHEDULE option in the task to recurring and set the time to a selected day of the week, then set the Segment filed to All Players and set the action to grant items to player. The task will run as the time you set.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.