Frictional Games Forum (read-only)
Looping sound - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Looping sound (/thread-13419.html)



Looping sound - Thegood - 02-19-2012

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?



RE: Looping sound - flamez3 - 02-19-2012

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



RE: Looping sound - Thegood - 02-23-2012

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: Looping sound - Your Computer - 02-24-2012

(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.