I am currently working on an inventory system, using the InventorySystem plugin as a basis. This plugin sets up the inventory using a uniform array, with each inventory item taking up a slot in the array. I’m hoping to add functionality so that, upon right-clicking on a slot in the array, a menu will open to show the user different things they can do with that item. However, I am struggling with, when the right mouse button is clicked, finding which array item has been clicked. Thank you!
Hey, it depends on how the widget is configured…
Try to see if there is a variable called “Index” in your Slot Widget, then, grab the SlotsArray, get the item based on that Index and do your things.
Something like this (this is in the Widget Slot, in the function “On Mouse Button Up”, you can have this function by Clicking on “Override” next to Functions on the left panel)
Don’t forget to return “handled” at the end of your function and on any execution pin that is not plugged (eg: branch(false), Cast(cast failed), etc…) :