Frictional Games Forum
[Solved] Sound Isn't Playing? - Printable Version

+- Frictional Games Forum (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: [Solved] Sound Isn't Playing? (/thread-13258.html)

Pages: 1 2


[Solved] Sound Isn't Playing? - Strembitsky - 02-11-2012

Here is my code:

Code:
void Shout(string &in asChild, string &in asParent, int alState)
{
    SetEntityActive("deformed_man_2", false);
    SetEntityActive("deformed_man_1", true);
    SetPlayerActive(false);
    StartPlayerLookAt("deformed_man_1", 15, 15, "");
    PlaySoundAtEntity("FatherSufferSame.ogg", "FatherSufferSame.snt", "deformed_man_1", 0, false);
    AddEffectVoice("", "", "Subtitles", "FatherSufferSame", false, "", 1, 10);
    AddTimer("Shout2", 5, "Shout2");
}


The function DOES get called, but not the subtitles, or the sound.


RE: Sound Isn't Playing? - trollox - 02-11-2012

I'm having the same problem with a door. I want it to play music when i unlock it but i can't get it to work. Tell me if you get it to work. Would be great.

Trollox.


RE: Sound Isn't Playing? - Your Computer - 02-11-2012

If you bring up the debug menu, you can enable a feature that lists all the sounds playing on the top left of the screen. Check to see if the sound gets listed there.


RE: Sound Isn't Playing? - Strembitsky - 02-11-2012

(02-11-2012, 08:32 PM)Your Computer Wrote: If you bring up the debug menu, you can enable a feature that lists all the sounds playing on the top left of the screen. Check to see if the sound gets listed there.
It does not get listed.
The only other sound I have playing is ambient music.


RE: Sound Isn't Playing? - Your Computer - 02-11-2012

Does having just one function that plays sound make the sound work? Also, can you also post the contents of FatherSufferSame.snt?


RE: Sound Isn't Playing? - Strembitsky - 02-11-2012

(02-11-2012, 08:43 PM)Your Computer Wrote: Does having just one function that plays sound make the sound work? Also, can you also post the contents of FatherSufferSame.snt?
I have tried getting rid of AddEffectVoice, and it still didn't play.

Here is my snt:

Code:
<SOUNDENTITY>
  <SOUNDS>
      <Main>
        <Sound File="FatherSufferSame.ogg" />
      </Main>
  </SOUNDS>
  <PROPERTIES Volume="5" MinDistance="2" MaxDistance="20" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="True" Blockable="True" BlockVolumeMul="0.8" Priority="0" />
</SOUNDENTITY>



RE: Sound Isn't Playing? - Your Computer - 02-11-2012

Try changing priority from 0 to 2. If that doesn't work, then try changing Blockable from True to False.


RE: Sound Isn't Playing? - Strembitsky - 02-11-2012

Still didn't work. I tried with blockable true, priority 2, and block true + priority 2.


RE: Sound Isn't Playing? - Your Computer - 02-11-2012

Does the hpl.log provide any insight?


RE: Sound Isn't Playing? - Strembitsky - 02-11-2012

Code:
ERROR: Couldn't load sound data 'C:/Program Files (x86)/Amnesia - The Dark Descent/redist/custom_stories/Dreadful Fires/sounds/Father/FatherSufferSame.ogg'
ERROR: Couldn't load sound data 'C:/Program Files (x86)/Amnesia - The Dark Descent/redist/custom_stories/Dreadful Fires/sounds/Father/FatherSufferSame.ogg'
ERROR: Could not load sound 'FatherSufferSame.ogg'
ERROR: Can't find sound 'FatherSufferSame.ogg'!
ERROR: Couldn't play sound 'FatherSufferSame.ogg' for sound entity FatherSufferSame.ogg

I fixed it. I re-wrote the entire script, and it's fixed now. I also got rid of PlaySoundAtEntity, because you can play your voice at an entity with voice effect.