Frictional Games Forum (read-only)

Full Version: Looping sound
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to loop a sound ("insanity_whisper.snt", to be specific) when you go into a script area, and then when you go into a second script area, the whisper stops. Is the only way to do that with a timer? And if so, whats the best way to code it?
Make a new copy of the sound as well as the .snt file and open the copied .snt file using a text editing program. Then change the Loop="False" to Loop="True". Then when you want to stop the sound just use

Quote: StopSound(string& asSoundName, float afFadeTime);
Fades out a sound.
asSoundName - internal name
afFadeTime - time in seconds, use 0 to immediatly stop the sound
I can get it to fade out immediately, but I'm having trouble making it so that it slowly fades. Do I have to edit something in the SNT file for it to fade?
(02-23-2012, 10:33 PM)Thegood Wrote: [ -> ]I can get it to fade out immediately, but I'm having trouble making it so that it slowly fades. Do I have to edit something in the SNT file for it to fade?

Re-read what he said, but make sure to change file names.