How do I…?
How do I get stackable items to be dragged out of the inventory and dropped next to the player AND pick items back up without them overlapping in the inventory (see below screenshot)? For transparency/reference, I followed this tutorial, but had to deviate a bit because I wanted items to be draggable: https://www.youtube.com/watch?v=jdVgieW4L6k
What is the expected result?
I want to be able to pick up both stackable and non-stackable items, and drop them outside of the inventory (near the player). I would also like to be able to move items around within the inventory and discard items, but that’s a challenge for a different day…
What is the actual result?
[A video of the issue will follow]
Picking up stackable and non-stackable items works fine, and dropping non-stackable items works as intended. HOWEVER, when I click a stackable item within the inventory, it splits the items in a weird way (placing a copy in the first inventory slot) and when the LMB is released four (4) things happen: the item count doesn’t decrease, the item stays wherever the mouse is, it’s still draggable, and it follows the PC… Additionally, when I re-pick up an item, it goes into the first inventory slot even if that slot is full…
Related screenshots
Here are the screenshots of the relevant events (note: you’ll see that I added comments in the events for myself so that I can remember/understand what for future reference - hopefully this will help you as well):
Thank you all very much in advance! If you need any more references, please let me know!