Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: randypana on Tue 30/07/2013 01:33:37

Title: interaction problem
Post by: randypana on Tue 30/07/2013 01:33:37
hello as I can make this script for interactions: how to use an inventory object in an object in a room to make something happen that
Title: Re: interaction problem
Post by: Khris on Tue 30/07/2013 11:44:16
-Select the object
-click the thunderbolt icon in the properties ( âš¡  )
-click on "use inv item on object", click the button that looks like this: [...]
-to check for the inv item, do:
Code (ags) Select
function oTheObject_Useinv()
{
  if (player.ActiveInventory == iStick) {
    // iStick was used on oTheObject
    // ...
  }
  else player.Say("I can't do that.");
}


Also: asked and answered a hundred times.