Inventory mouse mode Interact cursor.. want Look only on Inv Item.

Started by barefoot, Mon 30/05/2011 09:52:01

Previous topic - Next topic

barefoot

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.

Code: ags

mouse.DisableMode(eModeInteract);


And this does about the same:

Code: ags
mouse.ChangeModeView(eModeLookat, 1);


Can you help please

barefoot



I May Not Be Perfect but I Have A Big Heart ..

Khris

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
Code: ags
  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
Code: ags
    inventory[game.inv_activated].RunInteraction(eModeLookat);

barefoot

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
I May Not Be Perfect but I Have A Big Heart ..

Khris


SMF spam blocked by CleanTalk