Frictional Games Forum (read-only)

Full Version: How to make a sound file directional
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was wondering which line/s in the .snt file dictates whether a sound can be heard anywhere in the map or just when you are close to the script area its playing from? I am trying to put an owl sound into my map and it keeps playing as if its right on top of you. Here is the snt file contents:

Quote:<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="owl1" />
</Main>
</SOUNDS>
<PROPERTIES Volume="0.2" MinDistance="1" MaxDistance="10" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="False" Blockable="False" BlockVolumeMul="0.2" Priority="0" />
</SOUNDENTITY>
How are you playing the sound in the script? Use PlaySoundAtEntity to do so. Also, set Use3D to true in your SNT file.
(04-25-2016, 06:51 PM)Mudbill Wrote: [ -> ]How are you playing the sound in the script? Use PlaySoundAtEntity to do so. Also, set Use3D to true in your SNT file.

Im making it play on a script area when you collide with a different script area. But even if I put the script area further away it still sounds likes its on top of you. I will change use 3D to true.
And how is your script for this?

I am able to set the sound to play at an area, and the sound will fade as I walk away from that area. The distance at which this happens is determined by MinDistance and MaxDistance in the SNT file.
(04-26-2016, 07:14 AM)Mudbill Wrote: [ -> ]And how is your script for this?

I am able to set the sound to play at an area, and the sound will fade as I walk away from that area. The distance at which this happens is determined by MinDistance and MaxDistance in the SNT file.

Some sounds are global, like the wind, it can be heard at the same volume no matter what distance you're at. But in any case I managed to fix this issue, I simply copied the properties of another sound file which worked the way I wanted. I have no idea why it wouldn't work before but it does now so im happy Big Grin