Well this have been discussed here
I'm trying to make it add another stack of items if count exceeds 100, or item is not stackable, it is possible since the player:addItem(item, count) works this way just fine:
if you use for example:
It will add 5 stacks of 100 crystal coins or if you use a sword:
it will add 8 swords.
but for some reason, when adding items to any container or using Game.createItem(item, count) won't add more than the stack limit, or it will add just 1 item if the item is non stackable.
after putting some thought into it, it might work only with players since if it adds another stack to the player and he doesn't have space for it, it will drop it on the ground but it's not doing the same thing for containers, if it could check if the container has sufficient slots to hold all the stacks/number of items used in count it should be capable to add the items correctly
it would be really cool if someone could help me with this since this is keeping me from releasing some buggy stuff
I'm trying to make it add another stack of items if count exceeds 100, or item is not stackable, it is possible since the player:addItem(item, count) works this way just fine:
if you use for example:
Code:
player:addItem(2160, 500)
Code:
player:addItem(2376, 8)
but for some reason, when adding items to any container or using Game.createItem(item, count) won't add more than the stack limit, or it will add just 1 item if the item is non stackable.
after putting some thought into it, it might work only with players since if it adds another stack to the player and he doesn't have space for it, it will drop it on the ground but it's not doing the same thing for containers, if it could check if the container has sufficient slots to hold all the stacks/number of items used in count it should be capable to add the items correctly
it would be really cool if someone could help me with this since this is keeping me from releasing some buggy stuff
Last edited: