Strembitsky
Senior Member
Posts: 254
Threads: 37
Joined: Feb 2012
Reputation:
3
|
[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 |
|
trollox
Member
Posts: 215
Threads: 16
Joined: Dec 2011
Reputation:
3
|
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 |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
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.
|
|
02-11-2012, 08:32 PM |
|
Strembitsky
Senior Member
Posts: 254
Threads: 37
Joined: Feb 2012
Reputation:
3
|
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 |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
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?
|
|
02-11-2012, 08:43 PM |
|
Strembitsky
Senior Member
Posts: 254
Threads: 37
Joined: Feb 2012
Reputation:
3
|
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 |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
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.
|
|
02-11-2012, 08:51 PM |
|
Strembitsky
Senior Member
Posts: 254
Threads: 37
Joined: Feb 2012
Reputation:
3
|
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 |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: Sound Isn't Playing?
Does the hpl.log provide any insight?
|
|
02-11-2012, 09:07 PM |
|
Strembitsky
Senior Member
Posts: 254
Threads: 37
Joined: Feb 2012
Reputation:
3
|
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 |
|
|