What is the way to indicate which is the exclusive inventory object with which we want to interact so that it is the only one possible and any other interaction is interpreted as invalid and is not detected by the function hotspot.IsInteractionAvailable(mouse.Mode)
(https://www.flowingbytes.com/ags/inventoryonHotspot.jpg)
In other words:
1) If I use the correct inventory item with an hotspot i want to run the correct action with isInteractionAvailable
2) If i don't use the correct inventory item with an hotspot i want to run a personal unhandled event to manage it.
If you assign a function to that event, IsInteractionAvailable(eModeUseinv) will be true.
In your handler function you need to check player.ActiveInventory and call your custom function in the else clause (you have to make it global for that, i.e. import it in the global header).
function hGriffoBarra_Useinv() {
if (player.ActiveInventory == iExclusiveItem) {
// ...
}
else MyUnhandled();
}
thanks!!! I supose that it's not managed with the unhandled_event native of Ags, it isn't?
No, the automatic calling of unhandled_event only happens if there's no function linked to the event.
Thanks!! SOLVED with capitals!!