Frictional Games Forum (read-only)
[SCRIPT] Subtitles - 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: [SCRIPT] Subtitles (/thread-21164.html)



Subtitles - Cyphermur9t - 04-14-2013

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



RE: Subtitles - NaxEla - 04-14-2013

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.