16
Technical forum / Re: Text and voice scene. Lock movement in the x-axis or keyboard control?
« on: December 02, 2017, 12:44:34 AM »
Hi Indra Anagram
You should use Talk method. See what does documentation say:
Talk(Text, SoundFilename, Duration, TalkStances, TextAlignment)
TalkAsync(Text, SoundFilename, Duration, TalkStances, TextAlignment)
Makes the object talk.
Parameters :
Text
A text to be used as a talk subtitle
SoundFilename
A filename of a sound file to be used (oprtional, default is no sound)
Duration
A subtitle duration in milliseconds (optional, default is 0)
TalkStances
A comma separated list of talk "stances" to be used for the talking (optional, default is random stances)
TextAlignment
A text alignment for the subtitle (0-left, 1-right, 2-center) (optional, default=2)
Remarks
Talk method blocks the script execution until the animation is over, while the TalkAsync method returns immediately. If the duration is set to zero, it's calculated automatically either from the sound file or from the length of the subtitle.

Quote
1. Where do I specify SubtitlesPosXetc.? What file should it be in?Let me show you an example. Open your speaker.script and write something like this:
Code: WME Script
- #include "scripts\base.inc"
- this.SubtitlesPosXCenter = center.
Quote
2. How do I play the voice file at the same time with the text being on screen?
You should use Talk method. See what does documentation say:
Talk(Text, SoundFilename, Duration, TalkStances, TextAlignment)
TalkAsync(Text, SoundFilename, Duration, TalkStances, TextAlignment)
Makes the object talk.
Parameters :
Text
A text to be used as a talk subtitle
SoundFilename
A filename of a sound file to be used (oprtional, default is no sound)
Duration
A subtitle duration in milliseconds (optional, default is 0)
TalkStances
A comma separated list of talk "stances" to be used for the talking (optional, default is random stances)
TextAlignment
A text alignment for the subtitle (0-left, 1-right, 2-center) (optional, default=2)
Remarks
Talk method blocks the script execution until the animation is over, while the TalkAsync method returns immediately. If the duration is set to zero, it's calculated automatically either from the sound file or from the length of the subtitle.