Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Looping sound
Author Message
Thegood Offline
Junior Member

Posts: 20
Joined: Feb 2012
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,319
Joined: Apr 2011
Reputation: 57
Post: #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 all posts by this user Quote this message in a reply
Thegood Offline
Junior Member

Posts: 20
Joined: Feb 2012
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,267
Joined: Jul 2011
Reputation: 223
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)