Hey people!
I am looking for a way to use an inventory item on a GUI element. The goal is to make the user select an inventory object and use it as a weapon against enemies. Any ideas?
(https://ibin.co/w800/3eWlG2QhK8RQ.png)
If the GUI element is a button, just use its OnClick handler and in there, check
if (mouse.Mode == eModeUseinv && player.ActiveInventory == iBlueCube) {
If the GUI element isn't a button, turn it into a button.
If that's not feasible, use on_event / eEventGUIMouseUp and GUIControl.GetAtScreenXY(mouse.x, mouse.y)
Works like a charm ;-D:-D Thanks Khris!