For my gui, i want inventory items to be used automatically when clicked, and only combined if a button is pressed. I want my inventory window to be opened up, then , when you click on an inventory item, it is used on the selected hotpot (selecting the hotspot is already done). I tried using the "runhotspotinteraction" but this doesn't allow for conditionals and such. Is there a way to simulate selecting an inventory ieam and running its interaction without moving it from your inventory and only clicking once?
You can do it with RunHotspotInteraction. Just in the on_mouse_click:
if (button == LEFTINV) {
RunHotspotInteraction(HOTSPOTNUM, 4);
}
And replace HOTSPOTNUM with a variable which defines the hotspot it's used with. In the hotspot interactions, set up your interaction for the "Inventory used with hotspot" interaction as usual.
no, that doesn't work, because you can't set it to specific inventory items.
if (game.inv_activated == 1)
You can use SetActiveInventory to change the active inv item before you call RunHotspotInteraction, then change it back afterwards if you like.