Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: metalmario991 on Sun 08/03/2015 02:33:07

Title: Interact Icon in Inventory
Post by: metalmario991 on Sun 08/03/2015 02:33:07
I am trying to implement a Use/Interact Icon in the inventory box, but I am running into some problems. When you click on it changes to the walk icon and it doesn't interact with anything. Here's how I wrote it;

function bInteract_OnClick(GUIControl *control, MouseButton button)
{
mouse.Mode = eModeInteract;
mouse.UseModeGraphic(eModeInteract);
}
Title: Re: Interact Icon in Inventory
Post by: Slasher on Sun 08/03/2015 05:32:24
If I understand correctly you want the button to change cursor to interact.

you will need to, in the button properties, select: click action, SetCursorMode.

Change: NewModeNumber to 2 (interact).

Hope this fulfills what you wanted..


Title: Re: Interact Icon in Inventory
Post by: metalmario991 on Sun 08/03/2015 14:38:09
I got the cursor to change but it is just doing the same thing as the pointer icon. I need the player to be able to interact items within the inventory. How do I do this?
Title: Re: Interact Icon in Inventory
Post by: monkey0506 on Sun 08/03/2015 18:41:11
What code do you have for clicking on the inventory? Is "Handle inventory clicks in script" enabled in the General Settings?
Title: Re: Interact Icon in Inventory
Post by: metalmario991 on Sun 08/03/2015 23:22:32
In the Inventory section for General Settings I have this:

Display multiple icons for multiple items = false
Inventory item cursor hotspot marker = none
Override built-in inventory window click handling = false
Use selected inventory graphic for cursor

Will that help?