Reading through the forums, I've not been able to find a solution for a specific issue I'm having, apologies if I've overlooked anything.
Essentially at the moment, when I left click on an item in the inventory, it becomes the mouse cursor so it can be used on other items. The code for this is as part of the BASS template:
Code: ags
If I replace the else if so it's like so:
Code: ags
Then that changes it so that whatever event is set to interact for all inventory item runs (and conversely I can no longer have the mouse cursor become the inventory item).
The basic concept is that I have a book which the player can pick up, which the player can then left click on in the inventory bar and it opens up a new room with an object on the screen that functions as a book they can read.
The question I have, is there to set the book inventory item so it's the only inventory item that will run emodeinteract whilst all others will stick to automatically becoming the cursor?
Essentially at the moment, when I left click on an item in the inventory, it becomes the mouse cursor so it can be used on other items. The code for this is as part of the BASS template:
function on_mouse_click(MouseButton button)
{
if (action != null)
{
action.Text = "";
}
if (!IsGamePaused() && (button == eMouseLeft || button == eMouseRight))
{
do_room_action(button);
}
else if (button == eMouseLeftInv || button == eMouseRightInv)
{
do_inventory_action(button, inventory[game.inv_activated]);
}
}
If I replace the else if so it's like so:
else if (button == eMouseLeftInv || button == eMouseRightInv)
{
inventory[game.inv_activated].RunInteraction(eModeInteract);
}
Then that changes it so that whatever event is set to interact for all inventory item runs (and conversely I can no longer have the mouse cursor become the inventory item).
The basic concept is that I have a book which the player can pick up, which the player can then left click on in the inventory bar and it opens up a new room with an object on the screen that functions as a book they can read.
The question I have, is there to set the book inventory item so it's the only inventory item that will run emodeinteract whilst all others will stick to automatically becoming the cursor?