question

Anthony Pike avatar image
Anthony Pike asked

Am I able to set a custom expiry time each time I grant an an item?

Is it possible to set a custom expiry time each time an item is granted?

For example, I want to give out an item reward but I want it to expire at a fixed time (eg at the end of the year).

In my case this would mean that an item given in January and an item given in November would expire at the same time, so I can't use the expiry time in the item definition.

In-Game Economy
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

There is no customized expiration time that you can define when calling GrantItemsToUsers. However, if you want to expire items in a bulk, configuring a Scheduled Task can help.

Otherwise, consider this feature as an event triggered and is per player. You may define expiration time in custom data of this inventory item when it is granted. Then let your client iteratively check inventory item data from time to time (for example, check once when the first login everyday), so that you can submit inventory IDs to your customized Azure Function for revoking.

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.