Frictional Games Forum (read-only)
Scripting voices - 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: Scripting voices (/thread-13920.html)



Scripting voices - Kauren - 03-11-2012

I have been working on a script to have voices in my custom story. Here's what I have:


void OnStart()
{
AddTimer("Test", "5.0f", "Intro_1");
}


void Intro_1(string &in asTimer)
{
AddEffectVoice("MeSpeaking.ogg", "", "Subtitles", "MeSpeaking", false, "", 0, 0);
}



And here's my lang file:
<LANGUAGE>
<CATEGORY Name="Subtitles">
<Entry Name="MeSpeaking">I need you to work god damnit!</Entry>
</CATEGORY>
</LANGUAGE>


Help is very much appreciated!


RE: Scripting voices - Traggey - 03-11-2012

Why would you post two threads abouts this..?



RE: Scripting voices - Kauren - 03-11-2012

(03-11-2012, 03:05 PM)Traggey Wrote: Why would you post two threads abouts this..?
I made an error on the first post, tried to fix it. Ended up in a double post Confused


RE: Scripting voices - Kauren - 03-11-2012

Still can't make it and help is still appreciated..


RE: Scripting voices - Elven - 03-12-2012

when you ask help me, please enable your private message sending next time...

Here is your answer:

Quote:void OnStart()
{
AddTimer("Test", "5.0f", "Intro_1");
}

void Intro_1(string &in asTimer)
{
AddEffectVoice("MeSpeaking.ogg", "", "Subtitles", "MeSpeaking", false, "", 0, 0);
}


Ur AddEffectVoice is set up incorrectly.

Firstly, you haven't set up the entity, where you want it to be played.

Secondly, your sound range is both 0. I recommend using minimum range something like 4 and max 16, but it depends from distance and if you can move around.

Here is example how I used it at one place:

AddEffectVoice("death1.ogg", "", "Subtitles", "Ideath1", true, "hanging_lantern_ceiling_chain_1", 4, 16);