# Complex Inventory help?

**URL:** <https://forum.kirupa.com/t/complex-inventory-help/322217>\
**Category:** Uncategorized\
**Created:** [May 14, 2011, 8:06pm UTC](https://forum.kirupa.com/t/complex-inventory-help/322217 "2011-05-14T20:06:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![revin](https://avatars.discourse-cdn.com/v4/letter/r/919ad9/32.png) [@revin](https://forum.kirupa.com/u/revin)\
**Post date:** [May 14, 2011, 8:06pm UTC](https://forum.kirupa.com/t/complex-inventory-help/322217/1 "2011-05-14T20:06:20Z")

</div>

hey guys

i have been trying different ways to create an inventory system both through object and array based inventory, one problem i’ve run into is how to make a stackable item?

some items will take up a inventory slot but other i will tag with variable “stackable=true;” which should make them stack up on one slot  
Example ( sword,sword,metal(x3),scrap,scrap)

while object/array may look like  
sword,sword,metal,scrap,metal,metal,scrap

something like that, how would one achieve such effect?  
any suggestions on an easier way?
