How to get a widget under dropped widget?

Hey All,
I have been trying to build an inventory system and everything is going smoothly except for the dropping of widgets into their slots. I have it set up currently to have the slot image change to the dragged item upon drop, but I have no way to tell the dragged widget which slot to switch the image to. Is there a blueprint node for this like a get widget on location or can I attempt to get a widget at the same location as the dropped widget?

1 Like

In the target widget fires event OnDrop. You should handle the drop event here.

My Products

1 Like

Yes but how do I get the widget that it should be giving the payload info to?

If you want to drag the current widget, use self.

1 Like

In retrospect, my question is pretty confusing. So I need to have it so that in the on drop part of my “Node” it will check for a “Slot” underneath or nearby it and give the payload information to said slot. both are widgets and I didn’t explain that well, sorry

Add a similar event to your source widget and call it when dropped:

image

2 Likes

Ok, but how do I decide which slot to notify? or rather, have the node decide which slot to notify

You could index your slots or mark them in another way if they are in the same class:

1 Like

oh ok, I understand now. Thanks for the help Supremative!!

Hi! Sorry to add my question here but I think it’s related. Do you know how to, when on drop, check if the drop is over one button or another inside the destination widget?
Thanks!