I am trying to understand if there is a bug with the legacy inventory stackables. My stackable item I would assume would roll up the items uses total to the Active but its not doing that in this example. Bug? Or am I using it wrong?
I am trying to understand if there is a bug with the legacy inventory stackables. My stackable item I would assume would roll up the items uses total to the Active but its not doing that in this example. Bug? Or am I using it wrong?
Assume that you grant 5 items to the player:
And then consume 3 items (for example calling the API ConsumeItem), now there are only 2 remaining usages left. At this point, Game Manager’s player inventory will show that there are 2 active status items and 4 stacked items.
That’s why the total stacked items are not match the remaining usage. And since the API GetUserInventory only retrieve the items in the player's inventory that in active status, then the result of "RemainingUses" is 2.
Thanks for the reply. I’ll am still confused. Using your screen shots. I see no difference between the first and second other than the active item remaining “uses left” changed. How can I tell which of the stacked items have been consumed in the second screen shot? All of them still report “uses left”:1 but I would assume some would remove 0 when consumed @Neils Shi
How can I tell which of the stacked items have been consumed in the second screen shot?
The amount of items consumed by the player will only be reflected in the "use left" change of the active items. And you have no way of knowing which stacked items are consumed.
All of them still report “uses left”:1 but I would assume some would remove 0 when consumed.
Please note that players can only consume items which in active status. And after player consumes the items, only the "use left" of the active item changes, the rest of the stacked items keep 1 "use left".
Please note that the API GetUserInventory only retrieve the items in the player's inventory that in active status. And if you grant multiple stackable items to user, each item will have their own item instance id. And then, except for the first granted item, other items will be transferred to Stacked status, and the total remaining usage will be added to the first granted item. This is how the items are stacked.
@Neils Shi I agree with you in that is how it suppose to work. But if you look at my screen shot the count returned is not the aggregate sum but only the active count.
2 People are following this question.