question

GOOFEES INC. avatar image
GOOFEES INC. asked

Item purchase restrictions

Hello. I would like to limit the number of times I can purchase an item, is that possible? Also, is it possible to remove the limit on the number of items at a certain time (such as every day)?

Player 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

·
Seth Du avatar image
Seth Du answered

Limit Item feature from PlayFab is designed for a global limit among a title, hence you need a workaround to fulfill your requirements.

  • Remove the virtual currency of an item in the catalog so that players cannot simply purchase this item via Client API PurchaseItem.
  • Record the purchase times for a player in Player Read-Only Data.
  • Create an Azure Function that will grant the item, subtract the virtual currency, and increase the purchase times by 1 in Player Read-Only Data.
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.