question

litebox avatar image
litebox asked

Is it possible to Stack two different Inventory Items?

Hi, we use Stackable & Consumable by Time Inventory Item (1 hour) to grant player limited time feature. This works pretty good, but some expensive Game's Bundles has 1 week and more of this feature (168 hours for example). Granting this amount of hours is a bit annoying from Analytics perspective (it's even hard to calculate amount of items to check everything is working good).

One idea we have, is to create few Stackable & Consumable by Time Inventory Items, like this:

- 1 Hour Item

- 24 Hours Item (1 Day Item)

- 168 Hours Item (1 Week Item)

However, in this case we loose ability to stack items, and if player will be granted with "1 Day Item" and "1 Week Item" at the same time, they start consume simultaneously without stacking, which is not behaviour we need.

My question is: is it possible to Setup Stacking Property which will depend on another Item Id? So when player granted with "1 Day Item" and "1 Week Item" only "1 Day Item" will be consuming, and "1 Week Item" will wait until the end of consuming of "1 Day Item" item?

Thank you!

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.

Seth Du avatar image
Seth Du answered

It seems your requirement is to maintain different items, which are Stackable & Consumable by Time. Meanwhile, in some cases, they are granted in a short interval and you don’t want them being consumed simultaneously.

You may use Time Group, which can be defined in the item configuration page -- “Time Group Name”. The expiration time will be accumulated when a new item with the same Time Group is granted. Hence, you may not worry about which item will be expired first. Please note that when the time is expired, those item will be expired at the same time immediately.

For example, item A will expired in 20s and item B with 30s, and they are in the same Time Group. After A is granted for 10s, B is granted. So after 20s, A won't be expired and A and B will both expire after total 50s (starting from A being granted firstly)

10 |1200

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

litebox avatar image
litebox answered

Thank you @SethDu, this approach is working

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.