Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Looping sound
Thegood Offline
Junior Member

Posts: 20
Threads: 6
Joined: Feb 2012
Reputation: 0
#1
Looping sound

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?
02-19-2012, 04:31 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: Looping sound

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

02-19-2012, 04:59 AM
Find
Thegood Offline
Junior Member

Posts: 20
Threads: 6
Joined: Feb 2012
Reputation: 0
#3
RE: Looping 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
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Looping sound

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

Tutorials: From Noob to Pro
(This post was last modified: 02-24-2012, 12:39 AM by Your Computer.)
02-24-2012, 12:38 AM
Website Find




Users browsing this thread: 3 Guest(s)