Ahoy all,
So I'm taking a short break from the meat of my game and coming back to a small issue I've had since starting to develop my own GUI. I've managed to create null event handlers for standard interactions with a simple application of the IsInteractionAvailable function, but I am having trouble working out how to make a null event handler for when the player clicks an inventory item on a hotspot, character or object that is not an expected interaction. I attempted the following:
Code: ags
And it works to a point, but it is also a dead giveaway that something has an item interaction, because if there is any item interaction available at all, it reverts back to no interaction at all. I tried Inventory.IsInteractionAvailable(), but that seems to be just the same as the above, when clicking on an item in the inventory itself. Not quite what I was looking for. Is there another function that I should know about?
So I'm taking a short break from the meat of my game and coming back to a small issue I've had since starting to develop my own GUI. I've managed to create null event handlers for standard interactions with a simple application of the IsInteractionAvailable function, but I am having trouble working out how to make a null event handler for when the player clicks an inventory item on a hotspot, character or object that is not an expected interaction. I attempted the following:
if (IsInteractionAvailable(MouseX, MouseY, eModeUseinv) == 0){
player.Phylactere("I can't use that there.");
}
else {
if (lt == eLocationCharacter) {
Character *c = Character.GetAtScreenXY(MouseX, MouseY);
c.RunInteraction(eModeUseinv);
}
...
}
And it works to a point, but it is also a dead giveaway that something has an item interaction, because if there is any item interaction available at all, it reverts back to no interaction at all. I tried Inventory.IsInteractionAvailable(), but that seems to be just the same as the above, when clicking on an item in the inventory itself. Not quite what I was looking for. Is there another function that I should know about?