inventory problem

Started by Babar, Sun 19/06/2005 21:50:29

Previous topic - Next topic

Babar

I've got this problem with my inventory GUI. The right click always results in the "LOOK" action. I don't want it to, but it does. It's annoying because there is already a look button. I have no idea how to change it. There is nothing I can see in the inventory script about looking with the right mouse button.
The ultimate Professional Amateur

Now, with his very own game: Alien Time Zone

monkey0506

Perhaps posting some script?  Without it, it's kind of hard to see what the problem is.

Babar

I'm just using the standard inventory GUI. I didn't change anything (except for the GUIs background graphic). Try it yourself. The same thing should happen.
The ultimate Professional Amateur

Now, with his very own game: Alien Time Zone

strazer

This is probably the default behaviour for right-clicks on inventory items. You can customize this by checking the "Handle inventory clicks in script" checkbox in the General settings and adding something like this to your global on_mouse_click function:

Code: ags

//...
//}
  else if (button == eMouseLeftInv) { // if left mouse button clicked on an inv item
    inventory[game.inv_activated].RunInteraction(mouse.Mode);
  }
  else if (button == eMouseRightInv) { // if right mouse button clicked on an inv item
    inventory[game.inv_activated].RunInteraction(eModeLookAt); // this is the standard behaviour, change as desired
  }
//else {   // right-click, so cycle cursor
//...


Babar

Thanks...
Ok, I have another inventory related question:
I've decided I don't want an inventory. Too much trouble. My character will only be able to carry 2 items at a time (however, there are more than 2 inventory items used in the game), so I thought that I could have both of them in the Iconbar that appears on the top.
One of them can be the active inventory, and I thought that the other can be an inventory box. The problem is that the inventory box would show both the inventory items. Is there a way to have two active inventories? I want it so that when the player right-clicks to change the cursor, it can cycle through both of the inventory items. Is that possible?
The ultimate Professional Amateur

Now, with his very own game: Alien Time Zone

SMF spam blocked by CleanTalk