Inventory Query - remove item

Hello!

First sorry for my bad English.
I follow tutorial series from youtube, but I’ve been stuck all day with this problem.
I create Inventory Query function and work very well.
basically, I’m done everything but I can’t figure it out how remove item from backpack, when used query.
If I have two item rock and use interact on Item, delete it. This fine. But this two rock still in inventory.

(Ryan Laley write to comments section under this video possible solution: you will need to edit the query function to return the slot index. Once you have that you can clear the contents of that slot by getting the index of the array and setting it all to black. But I don’t understand what to do :frowning: )

Many thanks for help!

Peter

And here is tutorial video:

so what i would try is on the inventory query function create a variable output and make it a integer and call it index and off of the for each loop with break drag the array index and plug it in then on the item go to where you call the item query right click on it and hit refresh node you should now see index and then where it says inventory component drag off that and say get inventory then drag off inventory and say remove index and put it in between the branch and the destroy actor and plug in your index

so the 2nd picture is you destroying the two items?

This picture show use inventory query function on item. If I have in backpack two or more rock, destroy this actor. But item rocks in inventory still I have.

Thank you! I’ll try it tomorrow, when I get on pc.

I try this (screenshot)
work, but delete only one item from inventory. No two as set I have in Query Amount on second screenshot. I need delele both rock item after use.

Are they stacking items or non stackable if its 2 different indexes we will need to change a few parts of the code?

Update. This system work is fine, but only I have query in 1 item. If I have 2 or more, still remove only one item.

Is it non-stackable. All my item is set to non-stackable.