1. What is the easiest and smoothest way to create a scene with just text on screen and voice behind, maybe with some background image or just against black screen? I found an advice about making a text window and then unloading it, but what about text AND voice (talk)?
SubtitlesPosRelative | Specifies whether the SubtitlesPosX and SubtitlesPosY attributes are relative to default position, or absolute screen coordinates |
SubtitlesPosX | The X position of speech subtitles (either relative to speaker's position or absolute screen coordinates) |
SubtitlesPosY | The Y position of speech subtitles (either relative to speaker's position or absolute screen coordinates) |
SubtitlesWidth | Width of speech subtitles. Set to zero to restore the default behavior. |
SubtitlesPosXCenter | Specifies if the SubtitlesPosX attribute affects the center of the subtitle or its left side. |
In scene_init.scriptCode: WME Script
0:42:19: Maximum texture size: 4096x4096
0:42:19: Engine initialized in 81 ms
0:42:19:
0:42:20: 'WINDOW' keyword expected.
0:42:20: Error parsing WINDOW file 'interface\YourWindow\YourWindow.window'
0:42:20: Runtime error. Script 'scenes\Text1\scr\scene_init.script', line 30
0:42:20: Call to undefined method 'Center'. Ignored.
For futher information see WME Documentation, section Scripting in WME, Script language reference and at last Entity object.
SubtitlesPosRelative Specifies whether the SubtitlesPosX and SubtitlesPosY attributes are relative to default position, or absolute screen coordinates SubtitlesPosX The X position of speech subtitles (either relative to speaker's position or absolute screen coordinates) SubtitlesPosY The Y position of speech subtitles (either relative to speaker's position or absolute screen coordinates) SubtitlesWidth Width of speech subtitles. Set to zero to restore the default behavior. SubtitlesPosXCenter Specifies if the SubtitlesPosX attribute affects the center of the subtitle or its left side.
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:
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)
Code: WME Script
#include "scripts\base.inc" this.SubtitlesPosXCenter = center.
11:56:33: Compiling script 'entities\speaker\speaker.script'...
11:56:33: Error@line 7: syntax error
11:57:28: Compiling script 'entities\speaker\speaker.script'...
11:57:28: Error@line 6: Variable 'center' is referenced but not defined
Now it should works fine :)
Hey NAItReIN, the error's gone! However, the text is still glued to the top of screen. Sorry, I don't know what's the reason.
Indra Anagram, please, see image bellow
on "LeftClick", so in order to see that subtitle a player must use a mouse. See, my initial point was a scene with voice and text that sound and appear while the game is not interactive. Automatically you might say)
Indra Anagram, please, see image bellow
2. Is there a way to kinda lock actors' movement in the x-axis, so that they moved in a straight horizontal line, without swaying up and down in the y-axis? The point is there won't be any depth in my game, everything's pretty flat. Previously I asked this in one of the previous topics and anarchist shared a brilliant idea of making two blocked regions with a narrow walking path between them for actors. Still, sometimes I notice actor sprites do sway up and down a bit within that walking stripe. Is there a code to ban actors from moving in the y-axis at all or is keyboard control with LEFT and RIGHT keys the only way to provide movement in a perfect horizontal line?