Frictional Games Forum

Full Version: [Solved] Sound Isn't Playing?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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.
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.
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.
(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.
Does having just one function that plays sound make the sound work? Also, can you also post the contents of FatherSufferSame.snt?
(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>
Try changing priority from 0 to 2. If that doesn't work, then try changing Blockable from True to False.
Still didn't work. I tried with blockable true, priority 2, and block true + priority 2.
Does the hpl.log provide any insight?
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.
Pages: 1 2