Frictional Games Forum (read-only)

Full Version: Scripting voices
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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!
Why would you post two threads abouts this..?
(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
Still can't make it and help is still appreciated..
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);