Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: td on Wed 23/08/2006 19:34:34

Title: Use inventory on hotspot problem
Post by: td on Wed 23/08/2006 19:34:34
Hey! I try to make interaction: If current inventory use on hotspot = current action
Here is my code:

  if (player.ActiveInventory == iLamp)
  Wait(140);
  player.ChangeRoom (49) ;     
 

I remember it was work before, but now if i use ANY inventory item player change room! Why???
Title: Re: Use inventory on hotspot problem
Post by: Ashen on Wed 23/08/2006 19:43:26
Braces. Try:

if (player.ActiveInventory == iLamp) {
  Wait(140);
  player.ChangeRoom (49);     
}


As it is, only Wait(140); is associated with the iLamp condition, the Change room should run with anything.
Title: Re: Use inventory on hotspot problem
Post by: td on Wed 23/08/2006 20:10:53
Braces...so simple.

Thanks to "Ashen's hot line!" :)

SOLVED