Multiple Input on One Button

I want to make a list-based inventory system and if i press R while hover/clicked on a button it’d use the item,while i press F it’d dropped the item.i’m new on this and i can’t wraps my head around it

Many ways to do it; the most straightforward one I can think of:

  • in the Item widget

Also, ensure to tick this for the root of the widget:

image

Otherwise the editor will keep throwing unfriendly warnings at you like there’s no tomorrow.


There are better (but more involved ways) for when you need to tackle something a tad more complex.

thanks,much appreciated! but i have 1 more question,how do i make it so i can only drop/use the item when i have the item in inventory?I’ve tried your solution and it works,but the problem is i can still drop/use the item even when the item wasn’t there,made the quantity fall to minus.

You’d need to show the responsible script; let’s assume this is the logic:

Essentially, check if the quantity is greater than 0, and only then adjust quantity & execute the event.

Thank you so much! that fix the problem :pray:

1 Like