Ehrm... i've just implemented a first custom sound in my map by use of Adding Custom Sounds tutorial...
And it's working great However I want the sound only to play when a player is near... should I do this with a trigger multiple ?
Also I have more sounds to add and some of them need to play once when triggered, so can I just add a trigger in my map which targets the sound ?
Sorry about the melee of questions, but this scripting/mapping thing is still rather new for me, and I'm really just looking for some confirmation and perhaps some example scripts
Here is a simple little routine I wrote for one of our maps with a Grandfather clock we wanted to tick and chime, but only if a player was nearby, to save server resources.
Use a trigger_multiple around your script object as big as you need for sound distance to carry.
Okay, I've been toying with the solution AtOmiC mentioned...
And it looks like my sound is triggered because I'm getting a console message somewhere around the lines of "cannot playback stereo wav file" & "Microsoft PCM format only"
So, I take it that shows me my trigger works, but my wav file isn't compatible ?
Kalti wrote:And it looks like my sound is triggered because I'm getting a console message somewhere around the lines of "cannot playback stereo wav file" & "Microsoft PCM format only"
So, I take it that shows me my trigger works, but my wav file isn't compatible ?
The answer u already got in the console: The wav file must be PCM/mono format.
Most soundcards come with software to edit/convert ur wav file. In fact, even WinAmp can do this: Go Preferences/Output, select Nullsoft Diskwriter, go Configure, Choose 'PCM' as format and Attribute '44kHz, 16bit, mono' and "play" the file. The wav file is then written to the selected output directory.
Guys, thank you very much... I'm quite happy with the script for the chickens as it's to be used in a situation where the player scares off some chickens while sneaking through the bushes.
However, I have a location where I would need to have the sound playing for as long as there's a player in the trigger, so just have to get that in the map aswell.