I'm using AGS 3.0.2.
I've got a custom-made inventory GUI that I've designed myself.
I'm also using a single cursor for the only two interactions within the game: INTERACT and LOOK. Left-click for Interact and Right-click for LOOK.
When I left-click interact on an item it's fine, the cursor changes to the inventory item as it should.
When I right-click to LOOK at an inventory item, nothing happens.
I have 'Handle Inventory Clicks in Script' set to True. If I change it to false then right-clicking DOES make it LOOK at the inventory item but it won't allow me to INTERACT by left-clicking. Swings and round-a-bouts.
I'm also using SSH's 'Description' module, I don't know if this is something to do with it.
My on_mouse_click code is here:
function on_mouse_click(MouseButton button) {
if (IsGamePaused()) return;
if (button == eMouseLeft) {
if (GetLocationType(mouse.x, mouse.y) == eLocationNothing) ProcessClick(mouse.x, mouse.y, eModeWalkto);
else {
if (mouse.Mode==eModeUseinv) ProcessClick(mouse.x, mouse.y, eModeUseinv);
else ProcessClick(mouse.x, mouse.y, eModeInteract);
}
}
else if (button == eMouseRight) {
if (mouse.Mode==eModeUseinv) mouse.Mode=eModeInteract;
else ProcessClick(mouse.x, mouse.y, eModeLookat);
}
else if (button == eMouseLeftInv) player.ActiveInventory = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
else if (button == eMouseRightInv) ProcessClick(mouse.x, mouse.y, eModeLookat);
}
Any suggestions?
Replace
else if (button == eMouseRightInv) ProcessClick(mouse.x, mouse.y, eModeLookat);
with
else if (button == eMouseRightInv) inventory[game.inv_activated].RunInteraction(eModeLookat);
(ProcessClick will click "through" GUIs.)
Thankyou SO much Khris, this has been bugging me for days!