# Add inventory slots for each inventory item with changing values

**URL:** <https://forums.unrealengine.com/t/add-inventory-slots-for-each-inventory-item-with-changing-values/408038>\
**Category:** UI\
**Tags:** inventory, unreal-engine, Widget, question, UMG\
**Created:** [October 26, 2017, 6:18pm UTC](https://forums.unrealengine.com/t/add-inventory-slots-for-each-inventory-item-with-changing-values/408038 "2017-10-26T18:18:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rising-Mobile](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rising-Mobile](https://forums.unrealengine.com/u/Rising-Mobile)\
**Post date:** [October 26, 2017, 6:18pm UTC](https://forums.unrealengine.com/t/add-inventory-slots-for-each-inventory-item-with-changing-values/408038/1 "2017-10-26T18:18:58Z")

</div>

Hey, i’ve been working on a inventory system and I now want an inventory slot to be added for each item in my itemList.  
So I wrote a function which does this, but the problem I now have is that each slot shows the same value and I want it to be so that I can just create the same slot widget but with values that change for each slot (so the first invSlot widget shows the value of the itemAmount array at the index 0 and the next for the index 1 etc.)  
Hope the question is clear (don’t really know how to explain this), added pictures of my widget and the function bound to the text in the invSlot widget as well as the function that adds the widgets into my inventory widget.  
Thanks in advance, any help or hint is appreciated!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_dceb25d5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_dceb25d5](https://forums.unrealengine.com/u/anonymous_user_dceb25d5)\
**Post date:** [October 26, 2017, 7:34pm UTC](https://forums.unrealengine.com/t/add-inventory-slots-for-each-inventory-item-with-changing-values/408038/2 "2017-10-26T19:34:57Z")

</div>

Rising-Mobile,

I would recommend you take a look at this tutorial about how to create an inventory system. I was able to take that and expand upon it greatly.

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

In this guide it mentions how to set up the slots as widgets and to assign them to the correct array slot. Make sure to watch and understand the concepts he talks about. I have a feeling that what you are trying to do is similar to that setup so you can either add your own additions to it or go off it like I did. I would start a new project and go through the whole tutorial and afterwards give it a few days to let the knowledge soak in. If you are still having trouble let us know.

---

<div class="post-metadata">

**Author:** ![Rising-Mobile](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rising-Mobile](https://forums.unrealengine.com/u/Rising-Mobile)\
**Post date:** [October 26, 2017, 9:41pm UTC](https://forums.unrealengine.com/t/add-inventory-slots-for-each-inventory-item-with-changing-values/408038/3 "2017-10-26T21:41:21Z")

</div>

Many thanks, feels good to know there are people out there who take their time and answer questions like this,  
best regards ^^
