Frictional Games Forum (read-only)

Full Version: Custom Sound Effect Not Directional...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Answer: Sound must be mono for it to work directionally. Thanks to Kurton and Mudbill for le helpz.

I made a custom sound effect and did this:
void OnEnter()
{
PlaySoundAtEntity("", "ticktock.snt", "clocksound", 0.0f, false);
}

My SNT file:
<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="ticktock.ogg" />
</Main>
</SOUNDS>
<PROPERTIES Volume="1" MinDistance="0.5" MaxDistance="2" Random="0" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="True" Use3D="True" Blockable="False" BlockVolumeMul="0.5" Priority="5" />
</SOUNDENTITY>

I wanted it to sound like it was coming from the clock but I don't understand why it's not coming from the scriptarea and instead is just around the player when you're near the scriptarea...
Try turning Use3D off. Might help, but it's a wild guess- it seems like it should work.
You could also use the level editor sound thingy (it's on the tool bar to the left).
Check if your custom sound is mono/one channel. If it's stereo, you can't use it as a directional sound
3D off using script: sound plays at player no matter what distance.
3D on using script: plays sound when near area but not directional.

(after removing script)
3D off using in-editor sound: sound plays at player no matter what distance.
3D on using in-editor sound: plays sound when near area but not directional.

The sound file is stereo. (http://i.imgur.com/gjh60nf.png)

So... ._.

Edit:
Also sorry for the late reply. I didn't get emailed ;-;

I just reeeeally want it to sound like it's coming from your left speaker/headphone when the clock is on your left. etc. I even unchecked "use default" when using the in-editor sound thingy and tested again but nope..

Edit2: Are all sound effects non-directional? Or is it just this specific issue...
I mean it raises in volume when you get closer, but it doesn't seem to come from any direction...
Well if it is like Kurton says, then it will not work if the file is stereo. Perhaps it has to do with it playing in both ears from a position, which cancels out the direction. I'm not sure, I have not delved into this topic.
(10-13-2016, 09:39 PM)Mudbill Wrote: [ -> ]Well if it is like Kurton says, then it will not work if the file is stereo. Perhaps it has to do with it playing in both ears from a position, which cancels out the direction. I'm not sure, I have not delved into this topic.

Oh I see. I misread what he wrote. I'll put it as mono and try again.

Edit: Working now! Thanks guys ; -;