Frictional Games Forum (read-only)
Custom Sound Effect Not Directional... - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Custom Sound Effect Not Directional... (/thread-52847.html)



Custom Sound Effect Not Directional... - 13irth - 10-11-2016

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


RE: Custom Sound Effect Not Directional... - Darkfire - 10-11-2016

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


RE: Custom Sound Effect Not Directional... - Kurton - 10-12-2016

Check if your custom sound is mono/one channel. If it's stereo, you can't use it as a directional sound


RE: Custom Sound Effect Not Directional... - 13irth - 10-13-2016

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


RE: Custom Sound Effect Not Directional... - Mudbill - 10-13-2016

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.


RE: Custom Sound Effect Not Directional... - 13irth - 10-13-2016

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