Hi, i have an inventory with an item (a dagger) in it.
when i drag the dagger and then i drop it inside the inventory i want the drop event to be fired.
But this drop event dont get fired when i drop the dagger in the areas marked with a red “x”.
If i drop the dagger in the areas marked with the green “x”, the drop gets fired (it gets fired correctly in all the remaining area of the inventory).
So why in those few cases the on drop event dont get called? and how to fix it?
Little Update, i tried to override the “on drop” function also on the item widget (the dagger in the image above) and:
when the "on drop"function of the inventory do not get called, the on drop of the item widget gets called, so its like that the area is occupied by the dagger.
Any idea on why this happen?
the dagger widget is not that big, i also tried to print his size to check…
ok, i have three type of widgets: inventory widget, InventoryGridWidget and ItemWidget.
inventory widget that is a container that holds the inventory grid widget (that is the actual inventory)
and when i pick up items, for each item i create an ItemWidget to represent the item in the inventory grid.
I see that you have functions that have their own purposes but I couldn’t see where this “On Drop” function was being called from your screenshots. I might miss it. Could you point out where you called this function?
This is the on drop on the InventoryGridWidgetWidget:
i wanted this to be called when i drop the itemwidget (the dagger of the first image) in any point of the grid.
But, as I said at the beginning, when i drop the item in those two areas marked with a red “X” (see the first image of this post) This on drop gets not called.
So i tried to add the on drop also in the ItemWidget(the dagger).
And i figured out that in those two cases gets called the ItemWidget “on drop”.
I know this is messy but its hard to explain all theese blueprints with just words and images…
Here’s my guess, it can be either your default values are set wrongly or your condition check doesn’t meet. A tip from me, you can analyze your blueprint flow by using the “print string” node.
I don’t know how you structure your blueprints but for the starter, you can try to print the string on the TRUE pin on these two nodes, and see what you got.