Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: hgames on Mon 26/12/2011 17:25:20

Title: How to get sound to play when inventory opens?
Post by: hgames on Mon 26/12/2011 17:25:20
Sorry if this is a noobish question but how do you get a sound to play when the inventory opens?
Title: Re: How to get sound to play when inventory opens?
Post by: Khris on Mon 26/12/2011 17:42:08
In the global script, find the function "show_inventory_window()", then put the AudioClip.Play command in there:

function show_inventory_window ()
{
  aOpenInv.Play();

  gInventory.Visible = true;
  // switch to the Use cursor (to select items with)
  mouse.Mode = eModeInteract;
  // But, override the appearance to look like the arrow
  mouse.UseModeGraphic(eModePointer);
}