I try to make an inventory where I can delete Items on click, which would look ingame like this:
and when I click on an item, it disappears. (Actually that's a trash section where I can throw Items away)
The code I've written for that looks like this:
<<for _i = 0; _i < $inv.length; _i++>>
<<link $inv[_i].name "inventory:trash">><<set $inv.deleteAt(_i, 1)>><</link>>
But when I click on something, the second items disapperas. How can I do it that the clicked item disappears?