Basically, i want to create a stackable item and show the amount it has on the inventory.
I’m doing this with the blueprint but the amount value is always the number of the sum, even with the increment.
this is the pickup(add to inventory/increase amount) the idea is simple: If have the same item(i check if is the same item through the icon, every icon is unique)-> increase amount, else -> add to inventory
Also, i tried putting a refresh inventory on every possible entry afther the loop body on for each loop. Nothing changes.
This is the refresh inventory(the inventory button has a text and the text is the quantity, quantity should be equal to the amount from the struct, also, the amount is only showed if it can Stack)
I dont think the do once is the problem, it comes from the UE4 UMG Inventory tutorial and it works fine(but i made some changes to the refresh, so i don’t know how it affects things). Also i don’t think i’m reseting the count, on the loop i check if i have the item, if i dont i add it to the inventory (it start with 0 then i add 1 to the value before putting on inventory) and on the loop i get the amount from the array index that already has the item(i’ve done some tests and it returns me the correct array index) and increment it.
But that’s what i THINK i’m doing, am i not?
PS: i’m pretty sure the do once on the refresh inventory is to put each item icon and the other stuff to it’s correct position, could be wrong though, as i’m not 100% sure how it works, as i said i got it from another dude.