Frictional Games Forum (read-only)

Full Version: Talking in CS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!

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


-Greatings
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()