question

operation283 avatar image
operation283 asked

Limiting the Number of Specific Items in the Inventory?,Limit Number of One Type of Item in Inventory?

I am using drop tables to award a random item to a player at the end of the game. However, I don't want players to be able to get an item in the drop table if they already have N of that item already. (Basically, I want to set a limit on the number of a specific item that a player can own at one time.) How can I achieve this?

,

I am using drop tables to award random items to players at the end of a game. Some of the items that I am giving out I would only like a player to have a specific number of. (Basically, I don't want players to get a certain item in the drop table if they already have N of that item.) How can I achieve this?

In-Game EconomyPlayer Inventory
1 comment
10 |1200

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

operation283 avatar image operation283 commented ·

Oh, I think I glitched the forum considering that it posted my title and description twice in different words... lol

0 Likes 0 ·

1 Answer

·
comc avatar image
comc Deactivated answered

Check out

https://api.playfab.com/docs/tutorials/landing-commerce/droptable

Using Option 1 and

https://api.playfab.com/documentation/server/method/GetRandomResultTables

you can have PlayFab return a valid result but not actually award it to the player. You have to do that yourself. You would then in a CloudScript or your own server function do the logic to check on the item balance you have defined and either reward the item or request a new item from PlayFab.

1 comment
10 |1200

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

operation283 avatar image operation283 commented ·

Oh, thanks! I can't believe I didn't think of that.

0 Likes 0 ·

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.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]