--------

Started by ------, Sat 25/10/2008 13:39:43

Previous topic - Next topic

------

----

Khris

This line
Code: ags
  player.ActiveInventory = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);

in the LeftInv code changes the player's ActiveInventory to the clicked one, and since RunInteraction is queued afaik, every item is always used on itself.
Removing it should be all you need to do.

------

#2
--------

Trent R

#3
The AGS default for selecting an inventory item uses the eModeInteract.

[Edit]:Side note: I personally would switch your inventory action to if == iVinagre, and use the else for "I can't". I think it makes more sense, and then you can add other interactions (which many games do for comedy or immersion purposes) if you so choose.

~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

Khris

Something must have happened to me lately, I can't think straight anymore...

Code: ags
  else if (button == eMouseLeftInv) {
    if (player.ActiveInventory != null) inventory[game.inv_activated].RunInteraction(mouse.Mode);
    else player.ActiveInventory = inventory[game.inv_activated];
  }

------

---
#5
--

SMF spam blocked by CleanTalk