question

loopan avatar image
loopan asked

Is there any way to keep the inventory item active when the number of items is 0?

The equipment in our game is in the form of a card, and a certain number of cards can be upgraded. My problem is that if the card is a consumable item, then when the equipment is upgraded, after the card is consumed, the number of cards is 0 and level +1, then the item becomes expired, but I don't want this result. , how do I change it?

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

For now if the remaining use of an item is 0, this item will be inactive and there is no way to retrieve it via API calls. It is by design.

However, a work around solution is that you can keep your cards Durable and update the quantities via item custom data of item instance. You can use Server API UpdateUserInventoryItemCustomData in Cloud Script to maintain the user 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.

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.