You should use:
Code: ags
...because checking what is under the mouse isn't 100% reliable (I'm not sure that is the issue here though)
At a guess, you aren't ever setting player.ActiveInventory to anything. If you are handling the clicks yourself you need specifically set it.
tInv = inventory[game.inv_activated];
...because checking what is under the mouse isn't 100% reliable (I'm not sure that is the issue here though)
Quote from: bx83 on Mon 29/07/2019 12:10:51
But why don't the lines:Code: ags if (player.ActiveInventory==null) { if (tInv.IsInteractionAvailable(eModeInteract)) { tInv.RunInteraction(eModeInteract);
do anything? Surely they should make the inventory item you just right-clicked on the ActiveInventory?
At a guess, you aren't ever setting player.ActiveInventory to anything. If you are handling the clicks yourself you need specifically set it.