I have done, but it doesn't help. I have a work-around where I add HotspotX and HotspotY as properties and duplicate the HotspotX and HotspotY entries in the inventory item and use those. That works fine.
I guess it's because I'm manually overriding the cursor image. Is there a way to automatically set the cursor to the activeInventory item if you're in UseInv mode?
My code is now
Code: ags
but it would be nice to not have to duplicate the values.
I guess it's because I'm manually overriding the cursor image. Is there a way to automatically set the cursor to the activeInventory item if you're in UseInv mode?
My code is now
InventoryItem* nextItem = FindNextItem(3, 6);
player.ActiveInventory = nextItem;
if(nextItem!=null)
{
mouse.ChangeModeGraphic(eModeUseinv, nextItem.CursorGraphic);
Verbs.SetAction(eGA_UseInv);
mouse.ChangeModeHotspot(eModeUseinv, nextItem.GetProperty("HotspotX"), nextItem.GetProperty("HotspotY"));
}
but it would be nice to not have to duplicate the values.