Frictional Games Forum (read-only)
Talking in CS - 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: Talking in CS (/thread-19399.html)



Talking in CS - SniperMajor - 12-01-2012

Hello!

How can you make a sequence, where a person is talking to you and there are subs like in the main game?


-Greatings


RE: Talking in CS - Damascus - 12-01-2012

These are the scripts you will want to use. First script is used to play a voice with a subtitle, and second script will allow you to play another line after one is finished.

void AddEffectVoice(string& asVoiceFile, string& asEffectFile, string& asTextCat, string& asTextEntry,
bool abUsePosition, string& asPosEntity, float afMinDistance, float afMaxDistance);


This adds a voice and an effect to be played. It is okay to call this
many times in order to play many voices in a row. The
EffectVoiceOverCallback is not called until ALL voices have finished.

asVoiceFile - the voice to play
asEffectFile - the effect to play
asTextCat - the category in the .lang file
asTextEntry - the text entry in the .lang file
abUsePosition - plays using 3D from the entity, or without 3D
asPosEntity - the entity at which the effect appears
afMinDistance - minimum distance to see the effect
afMaxDistance - maximum distance to see the effect

void SetEffectVoiceOverCallback(string& asFunc);

Sets the function to be called when the EffectVoices are finished.
Callback snytax: void MyFunc()