1991mirec
Member
|
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
|
|
11-20-2013 11:03 PM |
|
Rabishan
Member
|
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 |
|
Pherael
Member
|
RE: item stacking
Rabishan +1
I do this exactly this way and it's working for me.
|
|
11-21-2013 11:11 AM |
|
AndrewBGS
Member
|
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 |
|