question

pingu2k4 avatar image
pingu2k4 asked

Can items be set to only be purchased once?

If a player owns an item in their inventory, is it possible to have PurchaseItem decline?

 

If not, how would I best go about ensuring that the player can only purcahse one of an item?

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

·
brendan avatar image
brendan answered

No, the system is designed to let players purchase things multiple times, as that was a key requirement when we set up PurchaseItem. We do have a backlog item for item "uniqueness" - the feature request post for it is here: https://community.playfab.com/hc/en-us/community/posts/205479538-GrantItemsToUser-should-not-create-duplicate-nonstackable-items.

Please take a moment to vote that up, if it would be useful to your title - we try to prioritize items that developers are asking for, and the votes in our Feature Requests forum are part of how we track on that.

Right now, the simplest way to accomplish this would be to filter the item out of the list of those shown to the player (or show it as "already owned") in the in-game interface, and not allow the player to purchase it via the game. A hacked client could still purchase more than one, but as long as that doesn't cause an imbalance issue in your game, that shouldn't be an issue.

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.