Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Ytterbium on Wed 21/01/2004 02:22:42

Title: (EDITED) Triggering "look" interaction from script
Post by: Ytterbium on Wed 21/01/2004 02:22:42
I resolved the problem I was previously asking about in case anyone saw it. But I still have another problem.

I'd like to set clicking RIGHTINV to triggering the "Look" interaction of Inventory Item "game.int_activated." Uh...how?

Or, in other words, what function/command/random scripting gobbledegook term should I use to do this?
Title: Re:(EDITED) Triggering "look" interaction from script
Post by: strazer on Wed 21/01/2004 05:28:49
Hi!

Try adding this to your on_mouse_click function:

//...other button checks
else if (button==RIGHTINV) { // right click in inventory
  RunInventoryInteraction (game.inv_activated, MODE_LOOK);
}
//...more button checks, LEFTINV etc.

For this to work, "Handle inventory clicks in script" has to be turned on in the general settings.

Hope it works :)
Chris
Title: Re:(EDITED) Triggering "look" interaction from script
Post by: Ytterbium on Wed 21/01/2004 20:30:38
Thank you! The help file just wasn't telling me there was a RunInventoryInteraction command. This is just what I needed.