Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: barefoot on Mon 30/05/2011 09:52:01

Title: Inventory mouse mode Interact cursor.. want Look only on Inv Item.
Post by: barefoot on Mon 30/05/2011 09:52:01
Hi

I am trying to amend the Interact cursor from selecting a particular inventory Item and having just the Look mode which opens a gui (or also have the interaction cursor do the same as the Look Inventory)..

This code simply makes the cursor disappear.


mouse.DisableMode(eModeInteract);


And this does about the same:

mouse.ChangeModeView(eModeLookat, 1);

Can you help please

barefoot



Title: Re: Inventory mouse mode Interact cursor.. want Look only on Inv Item.
Post by: Khris on Mon 30/05/2011 10:51:48
This has been asked, please use the search.

Here's a thread about a similar problem:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=38635.msg508682#msg508682

Basically, changing the option in General settings allows you to handle inventory item clicks in on_mouse_click by using
  else if (button == eMouseLeftInv) {   // other ones are eMouseRightInv and eMouseMiddleInv
    ...
  }


Normally you'd now check for the mode but since you want to do the same thing regardless of the mode, just use
    inventory[game.inv_activated].RunInteraction(eModeLookat);
Title: Re: Inventory mouse mode Interact cursor.. want Look only on Inv Item.
Post by: barefoot on Mon 30/05/2011 12:40:39
Cheers Khris

I did not come across that thread, my search terms did not bring that one up.

I will add it to the script.

Thanks again

barefoot
Title: Re: Inventory mouse mode Interact cursor.. want Look only on Inv Item.
Post by: Khris on Mon 30/05/2011 18:46:06
I was searching for "interact inventory".