(07-17-2012, 07:57 PM)zecuro Wrote: (07-17-2012, 07:48 PM)JMFStorm Wrote: Look for Sounds & Music section here.
http://wiki.frictionalgames.com/hpl2/amn..._functions
yep pretty awesome thanks but i'm new to scripting and all so do you have advice on how to start
PlayGuiSound("sound.ogg", 1);
PlaySoundAtEntity("soundname", "sound.snt", "Player", 0, false);
PlayMusic("music.ogg", true, 1, 0, 1, false);
GuiSound - typically uses .ogg sound files and is not a 3D sound
SoundAtEntity - only uses a .snt sound file, meaning this is a 3D sound that can be played on any particular entity, fading at a certain distance. SoundName can be used later in the command StopSound("name", 0);
Music - uses .ogg sound files, the second parameter (true) allows it the loop, change to false if you do not want it to loop. The last "1" there determines priority; I would use 0 for background music. This is used in the actual game many times when you use music in an event and then it cuts into the background music again. The music in the event should be priority 1, allowing the music to play over the background, then cut back.