question

doronhn avatar image
doronhn asked

few questions about catalog and items

Hey,

i am trying to create a catalog for my game and i cant figure out what to do.

i have "power ups" that i want to sell, for example "Undo PowerUp".

in the inventory i create 3 diffrent items for the type of powerup.

a. one item is stackable, consumable with 1 count left.

b. one item is stackable, consumable with 3 count left.

c. one item is stackable, consumable with 5 count left.

when i grant the user one of each kind, i getting 3 diffrent items, and not one item with 9 count left.

what do i do wrong? maybe i implement it wrong. is it the best approch?

game manager
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

·
brendan avatar image
brendan answered

Yes, what you want to do is create only one item, with a count of 1, and make it stackable. Then, create Bundles that contain 3 and 5 of that item. That way, you can give the player the base item (giving them a count of 1), or a bundle of 3 or 5. Be sure to have the Bundle be consumable by time, so that it cleans itself up after a few seconds.

2 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.

doronhn avatar image doronhn commented ·

Why bundle needs to be consumable by time?

0 Likes 0 ·
brendan avatar image brendan doronhn commented ·

The bundle itself is an item, distinct from the contents of the bundle. If you don't have it expire - or at the very least be stackable - your player inventory will fill up with the bundle item, and eventually block the player from being able to add new items.

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.