Frictional Games Forum (read-only)
My sound won't play. - 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: My sound won't play. (/thread-15484.html)



My sound won't play. - Wapez - 05-18-2012

Hey guys, i'm making a custom story and I have a problem... A sound won't play. Does anyone find a problem in my script?



void OnStart()
{
PreloadSound("doorbell.snt");
SetEntityPlayerInteractCallback("doorbell", "doorbellsound", true);
SetEntityPlayerLookAtCallback("sign", "signtext", false);
}

void doorbellsound(string &in item)
{
PlaySoundAtEntity("", "doorbell.snt", "doorbell", 0, false);
PlaySoundAtEntity("", "scare_steps_big.snt", "door1", 0, false);
AddTimer("dingdong", 6, "bobishere");
AddTimer("explode", 8, "explodedoor");
}

void bobishere(string &in asTimer)
{
SetEntityActive("servant_grunt_2", true);
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_2", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_3", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_4", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_5", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_6", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_7", 0, "Idle");
PlaySoundAtEntity("", "amb_alert.snt", "door1", 0, false);
}

void explodedoor(string &in asTimer)
{
SetPropHealth("door1", 0.0f);
StartScreenShake(0.08f, 1.5, 0.5, 1.0);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "explosion_rock_large.snt", "Player", 0, false);
PlaySoundAtEntity("", "sanity_damage.snt", "Player", 0, false);
PlaySoundAtEntity("", "hurt_pant.snt", "Player", 0, false);
GiveSanityDamage(10, true);
}

void OnEnter()
{
}

void OnLeave()
{
}



RE: My sound won't play. - Xanthos - 05-18-2012

You got yourself a .snt file set up, Correct?


RE: My sound won't play. - Wapez - 05-18-2012

(05-18-2012, 02:31 AM)Xanthos Wrote: You got yourself a .snt file set up, Correct?
I think so, here it is. Also i have the doorbell.ogg in the same folder.


<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="doorbell" />
</Main>
</SOUNDS>
<PROPERTIES Volume="1" MinDistance="0.5" MaxDistance="12" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="True" Blockable="False" BlockVolumeMul="0.5" Priority="0" />
</SOUNDENTITY>


RE: My sound won't play. - Sazureth - 05-18-2012

I might have the same problem.

Yours could be caused by your custom map trying to use sounds from the vanilla game folder, not the folder of your custom story. At least I'm unable to use modified .snt files from the story folder.

Do you know is there any way to assign the folder for used sounds?


RE: My sound won't play. - FragdaddyXXL - 05-18-2012

As a precaution, you could change "doorbell" to "doorbell.ogg" in your .snt file. If you only have 1 doorbell.ogg, you can set Random to 0.

Is there already a doorbell sample in Amnesia? If so, you should be renaming your doorbell.snt and doorbell.ogg to be unique (doorbell2.snt doorbell2.ogg, etc.).