question

saashae avatar image
saashae asked

How do you increment the available quantity of a limited edition item from a player's action?

I would have liked to increment the quantity of a limited edition item, but under special conditions. I would like to see that when a player who owns a copy of the same limited edition item consumes it, the quantity available in the shop is increased again.

The aim would be to ensure a stable number of the same item in circulation throughout the game economy.

However, I think the only way to increase the quantity of a limited edition is to use the admin API... which doesn't seem possible if the player triggers the action by consuming their item.

Is there a way to overcome this problem?

I'd like to point out that it's not a problem that the number in circulation may fluctuate a little, it just needs to stay within a close range.

apisIn-Game EconomyPlayer 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

·
Made Wang avatar image
Made Wang answered

You can call IncrementLimitedEditionItemAvailability in the Azure Function, and then the client can call the Azure Function via ExecuteFunction.

3 comments
10 |1200

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

saashae avatar image saashae commented ·

Thank you for your answer. However, I thought it was not possible to call functions from admin API with Cloud Script (mentionned on a few questions like this one). Is it possible now ? I didn't find any information about that in the docs.

0 Likes 0 ·
Made Wang avatar image Made Wang saashae commented ·

Cloud Script legacy cannot call the admin API, but Azure Function Cloud Script can.

1 Like 1 ·
saashae avatar image saashae Made Wang commented ·

Thank you for your kind answer. I wasn't aware of the difference between Cloud Script legacy and the new one.

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.