How to get sound to play when inventory opens?

Started by hgames, Mon 26/12/2011 17:25:20

Previous topic - Next topic

hgames

Sorry if this is a noobish question but how do you get a sound to play when the inventory opens?

Khris

In the global script, find the function "show_inventory_window()", then put the AudioClip.Play command in there:

Code: ags
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);
}

SMF spam blocked by CleanTalk