Frictional Games Forum (read-only)

Full Version: how to make a sound play in a area?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey. I wonder how you make sounds of example flies, come from a dead body? Smile
PlaySoundAtEntity
You should look here first before asking these questions.
(04-03-2013, 01:51 PM)Smoke Wrote: [ -> ]PlaySoundAtEntity
You should look here first before asking these questions.
Yea I know but it dont loop.
If you know how to use Timers, you will want to loop them back on themselves to constantly play the sound you want.

You can use
Code:
AddTimer(string& asName, float afTime, string& asFunction);
and loop the timer back on it's self to replay the sound over and over.

Just make sure the function you call is a timer, and use
Code:
RemoveTimer(string& asName);
to stop the timer.
(04-03-2013, 01:57 PM)Rapture Wrote: [ -> ]If you know how to use Timers, you will want to loop them back on themselves to constantly play the sound you want.

You can use
Code:
AddTimer(string& asName, float afTime, string& asFunction);
and loop the timer back on it's self to replay the sound over and over.

Just make sure the function you call is a timer, and use
Code:
RemoveTimer(string& asName);
to stop the timer.
Ok, gonna try it out
Use a sound area for that.
open the .snt file. Look up "loop=false". Change false to true. Done!
(04-03-2013, 03:40 PM)Smoke Wrote: [ -> ]open the .snt file. Look up "loop=false". Change false to true. Done!
Ah it worked, thank you smoke! Smile