Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Hadjiguru on Sat 21/06/2003 12:59:39

Title: inventory and sound
Post by: Hadjiguru on Sat 21/06/2003 12:59:39
i want a certain sound-signal being heard everytime the player-character gets an inventory item. can i do that without scripting it for every single item?
Title: Re:inventory and sound
Post by: Dorcan on Sat 21/06/2003 14:13:26
A little function will be useful in this case, something like :

function AddInventorySound(int what){
   AddInventory(what);
   PlaySound(1);
}
Title: Re:inventory and sound
Post by: Hadjiguru on Sun 22/06/2003 17:13:07
thanks for help! yes, something like such a little function will do it.  i tried it  but it didnt work.
it says "nested function not supported". what now?
Title: Re:inventory and sound
Post by: Scummbuddy on Sun 22/06/2003 17:18:35
well, you have a braces problem... one is not closed properly.

But, I'm not sure you would even need this extra function... but perhaps you do.

I would just put the "playsound'' at the same point that i would be adding inventory, or you could have the invetory things hooked up to a point system, and there is a play sound at different point levels or when you just get points... i think that would work.