question

alecb avatar image
alecb asked

Prevent user buying more than X of an item

Is it possible to prevent players from buying more than a fixed amount of an item? We're building a game where players buy characters (similar to League of Legends), and we'd never want a situation where they accidentally buy the same character twice. The UI won't allow it, but we'd like enforcement of this on the server too.

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

·
brendan avatar image
brendan answered

Not currently, no. The way you would normally handle this is by simply not presenting the player with the option to purchase the item, as you describe. If this is a feature you'd like to see (specifically, blocking re-purchase of an item using virtual currency - given that we can't prevent purchases on iTunes, Google Play, etc., I'm assuming that's the intent), I'd recommend posting it to our Feature Requests forum.

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.