Below is my inventory system that I followed from a tutorial. How do I add both item values from different indexes in my inventory?
I want to be able to print the ‘X’ value as 12, instead of ‘X’ value as ‘10’ and ‘2’ separately, so I can get the exact total amount of ‘X’ item inside my inventory.
Can anyone provide me some insights on this? Thanks.
Which tutorial? you need to find part of blueprint that separates items like that end edit it so it support more then 10 items in boxes.
I followed this tutorial [link text]
I managed to retrieved the amount of items like above pic, but it’s only retrieve the item amount on the selected index.
For instance, the pic below will prints out 12 because the current value inside the first slot/index that is being used.
However, it won’t prints out total value of 18 in below pic because current index that is being used is on the 2nd slot/index.
I would like to retrieve total amount of item from every index available inside the array. Any ideas?
Alright, I finally managed to solved this. Hope this helps for anyone who encounter the same problem
I ended up creating new function and just use it whenever necessary, in my case I’m calling it inside the function where new items are added into the inventory.