About Store Forum Documentation Contact
Donations:
309$/mo



Post Reply 
item stacking
Author Message
1991mirec Offline
Member

Post: #1
item stacking
hello

I would like my character to collect things into the inventory for example 5 apples but as for right now when i grab 5 apples i got 5 icons in inventory next to each other. i would like them to stack in one place so it would write to upper left corner number of items i have and every time i add the same item to inventory i want to just add a number not a new icon.and when i throw item away and i have more of them it would again decrease the number. i can t think of any way how to do it. can you guys give me some hints some scripts some ideas please??? thank you in advance
mirec wink
11-20-2013 11:03 PM
Find all posts by this user Quote this message in a reply
Rabishan Offline
Member

Post: #2
RE: item stacking
just a suggestion, you could add new stack variable in your item class and whenever new item is added to the item container you can check if the same item already exists. if so then just increase the stack and remove the new item from the container.
11-21-2013 09:24 AM
Find all posts by this user Quote this message in a reply
Pherael Offline
Silver Supporter

Post: #3
RE: item stacking
Rabishan +1
I do this exactly this way and it's working for me.
11-21-2013 11:11 AM
Find all posts by this user Quote this message in a reply
AndrewBGS Offline
Member

Post: #4
RE: item stacking
Same here. Stack splitting and overflowing are the only things you need to take care of, but I think this is the way to go.
11-21-2013 12:19 PM
Find all posts by this user Quote this message in a reply
Post Reply