Frictional Games Forum (read-only)

Full Version: Subtitles
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How would one add subtitles? I have my character speaking, and would like to add the words to the bottom of the screen. Simple as that. I tried looking through other scripts but it's not very straight forward. Also, is there a timer you can have in number of seconds to choose how long the subtitles stay on the bottom there? Keep in mind this is not a flashback.

I believe I have the script set up correctly in the .lang file though.

PHP Code:
<CATEGORY Name="map01">
<
Entry Name="player01">Subtitle goes here</Entry>
</
CATEGORY
Wiki Wrote:
Code:
AddEffectVoice(string& asVoiceFile, string& asEffectFile, string& asTextCat, string& asTextEntry, bool abUsePosition, string& asPosEntity, float afMinDistance, float afMaxDistance);

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

That function play a voice and you can specify the category and entry name for the subtitles. The subtitles will last as long as the voice file does.