question

matt-6 avatar image
matt-6 asked

Bundle in Player Inventory

The way I've understood the difference between bundles & containers from the docs is that containers can end up in the player's inventory and a bundle cannot - i.e. it is consumed and its items given to the player when added.

I'm adding currency to one of our drop tables so have created a bundle with currency in it, which I've then added to a drop table. In turn this drop table has been put in a container. The container has then been opened in cloudscript using server.UnlockContainerInstance which has resulted in the bundle being added to the player's inventory rather than being consumed and the player given the contents as expected.

Do I need to process the items after opening the container and consume any bundles? Or is this a setup issue?

Player Inventory
bundlesetup.png (52.4 KiB)
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.

MoonHeonYoung avatar image MoonHeonYoung commented ·

Sorry the wrong comment

0 Likes 0 ·

1 Answer

·
Seth Du avatar image
Seth Du answered

When granting a bundle to a player, the player do receive an instance of bundle and all items contained in the bundle. This is by design.

If you do not need an instance of bundle itself, a workaround solution is that you can set his bundle consumed by time and after granted, it will revoke itself. Please see Brendan’s reply in this thread -- Granting a Bundle creates an ItemInstance of the Bundle?

Keeping the instances of bundles can help inventory management, for example, there is a starter bundle and all players can only be granted once, then this bundle instance can be a flag for checking. Thus setting a custom player data can also help. It depends on you.

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.