Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved] Sound Isn't Playing?
Strembitsky Offline
Senior Member

Posts: 254
Threads: 37
Joined: Feb 2012
Reputation: 3
#1
[Solved] Sound Isn't Playing?

Here is my 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.

The Nightmares v1.0 - Dreadful Fires WIP
(This post was last modified: 02-11-2012, 09:30 PM by Strembitsky.)
02-11-2012, 08:15 PM
Find Reply
trollox Offline
Member

Posts: 215
Threads: 16
Joined: Dec 2011
Reputation: 3
#2
RE: Sound Isn't Playing?

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.
02-11-2012, 08:23 PM
Find Reply
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#3
RE: Sound Isn't Playing?

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.

Tutorials: From Noob to Pro
02-11-2012, 08:32 PM
Website Find Reply
Strembitsky Offline
Senior Member

Posts: 254
Threads: 37
Joined: Feb 2012
Reputation: 3
#4
RE: Sound Isn't Playing?

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

The Nightmares v1.0 - Dreadful Fires WIP
02-11-2012, 08:40 PM
Find Reply
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#5
RE: Sound Isn't Playing?

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

Tutorials: From Noob to Pro
02-11-2012, 08:43 PM
Website Find Reply
Strembitsky Offline
Senior Member

Posts: 254
Threads: 37
Joined: Feb 2012
Reputation: 3
#6
RE: Sound Isn't Playing?

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

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

The Nightmares v1.0 - Dreadful Fires WIP
(This post was last modified: 02-11-2012, 08:46 PM by Strembitsky.)
02-11-2012, 08:45 PM
Find Reply
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#7
RE: Sound Isn't Playing?

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

Tutorials: From Noob to Pro
02-11-2012, 08:51 PM
Website Find Reply
Strembitsky Offline
Senior Member

Posts: 254
Threads: 37
Joined: Feb 2012
Reputation: 3
#8
RE: Sound Isn't Playing?

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

The Nightmares v1.0 - Dreadful Fires WIP
02-11-2012, 08:55 PM
Find Reply
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#9
RE: Sound Isn't Playing?

Does the hpl.log provide any insight?

Tutorials: From Noob to Pro
02-11-2012, 09:07 PM
Website Find Reply
Strembitsky Offline
Senior Member

Posts: 254
Threads: 37
Joined: Feb 2012
Reputation: 3
#10
RE: Sound Isn't Playing?

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.

The Nightmares v1.0 - Dreadful Fires WIP
(This post was last modified: 02-11-2012, 09:30 PM by Strembitsky.)
02-11-2012, 09:16 PM
Find Reply




Users browsing this thread: 1 Guest(s)