static int Speech.AnimationStopTimeMarginGets/sets the time margin at which the character talking animation should stop before before speech time ends. This property is specified in game loops and is set to 10 by default.
NOTE: This property only affects the animation if voice mode is disabled.
Example:
Speech.AnimationStopTimeMargin = 40;will stop talking animation 40 game loops (1 second with the default game speed) before speech time ends.
See Also: Speech.DisplayPostTimeMs
static bool Speech.CustomPortraitPlacementEnables/disables the custom speech portrait placement. When set to true the character portraits are positioned at screen coordinates defined by Speech.PortraitXOffset and Speech.PortraitY. When set to false the portraits will be automatically aligned again.
NOTE: This property has no effect if the Lucas-Arts speech style is used.
Compatibility: Supported by AGS 3.3.0 and later versions.
See Also: Speech.PortraitXOffset, Speech.PortraitY
static int Speech.DisplayPostTimeMsGets/sets the extra time the speech will stay on screen after its base time runs out. Commonly the time the speech lines and portrait stay on screen is calculated based on the text length - if the text mode is on, or voice clip length - if the voice mode is on. This property prolongs the time the speech text and/or portrait is displayed. This property does not interfere with speech skipping by key or mouse click: players will still be able to skip speech any time they want (if appropriate skip mode is enabled). This property is specified in milliseconds and is set to zero by default.
Compatibility: Supported by AGS 3.3.0 and later versions.
See Also: Speech.AnimationStopTimeMargin
static int Speech.GlobalSpeechAnimationDelayGets/sets global speech animation delay which affects every character in game. This property is specified in game loops and is set to 5 by default.
NOTE: This property is ignored if lip sync is enabled.
NOTE: The property is only used when the Speech.UseGlobalSpeechAnimationDelay is set to true. This property cannot be used if the global speech animation delay is disabled. In that case, the individual character's animation delay is used instead.
See Also: Character.SpeechAnimationDelay, Speech.UseGlobalSpeechAnimationDelay
static int Speech.PortraitXOffsetGets/sets the character's speech portrait horizontal offset relative to screen side. The actual x coordinate of the portrait is calculated based on whether portrait is to be displayed at the left or right side of the screen. This property specifies the distance between the screen side and respected portrait's border.
NOTE:The property is only used when the Speech.CustomPortraitPlacement is set to true.
Compatibility: Supported by AGS 3.3.0 and later versions.
See Also: Speech.CustomPortraitPlacement, Speech.PortraitY
static int Speech.PortraitYGets/sets the character's speech portrait y coordinate on screen.
NOTE:The property is only used when the Speech.CustomPortraitPlacement is set to true.
Compatibility: Supported by AGS 3.3.0 and later versions.
See Also: Speech.CustomPortraitPlacement, Speech.PortraitXOffset
static eKeyCode Speech.SkipKeyGets/sets special key which can skip speech text. This makes all other keys ignored when speech is displayed on screen, unless eKeyNone is assigned, in which case any key can be used again.
NOTE:The specified key will only skip speech if the appropriate speech skip style is enabled.
Example:
Speech.SkipKey = eKeySpace;will assign the "space" key to skip the speech.
See Also: Speech.SkipStyle
static SkipSpeechStyle Speech.SkipStyleGets/sets how the player can skip speech lines.
The accepted values are
eSkipKeyMouseTime player can skip text by clicking mouse or pressing key eSkipKeyTime player can skip text by pressing key only, not by clicking mouse eSkipTime player cannot skip text with mouse or keyboard eSkipKeyMouse text does not time-out; player must click mouse or press key each time eSkipMouseTime player can skip text by clicking mouse only, not by pressing key eSkipKey text does not time-out; player can skip text by pressing key only eSkipMouse text does not time-out; player can skip text by clicking mouse onlyExample:
Speech.SkipStyle = eSkipTime;will make the player unable to skip the text by pressing a mouse button or a key.
See Also: Game.IgnoreUserInputAfterTextTimeoutMs, Game.TextReadingSpeed, Game.Speech.SkipKey
static eSpeechStyle Speech.StyleGets/sets theway in which speech text is displayed. This modifies the setting originally set in the editor. SpeechStyle can be:
eSpeechLucasarts speech text over character's head eSpeechSierra close-up portrait of character eSpeechSierraWithBackground close-up portrait + background window for text eSpeechFullScreen QFG4-style full screen dialog picturesExample:
Speech.Style = eSpeechSierra;will change the speech style to a close up portrait of the character.
static Alignment Speech.TextAlignmentSets how text in Lucasarts-style speech is aligned.
The accepted values are
eAlignLeft eAlignCentre eAlignRightThe default is eAlignCentre.
Example:
Speech.TextAlignment = eAlignRight;will align the speech text at the right side.
static bool Speech.UseGlobalSpeechAnimationDelayGets/sets whether speech animation delay should use global setting, as opposed to individual character's setting. The actual global delay value is specified with Speech.GlobalSpeechAnimationDelay.
Example:
Speech.UseGlobalSpeechAnimationDelay = true;will make the game use global speech animation delay.
Compatibility: Supported by AGS 3.3.0 and later versions.
See Also: Character.SpeechAnimationDelay, Speech.GlobalSpeechAnimationDelay
static eVoiceMode Speech.VoiceModeGets/sets whether voice and/or text captions are used in the game.
Valid values for VoiceMode are:
eSpeechTextOnly no voice, text only eSpeechVoiceAndText both voice and text eSpeechVoiceOnly voice only, no textThe default is eSpeechVoiceAndText if in-game speech is enabled, and eSpeechTextOnly if it is not. Changing this setting changes the behaviour of all Say and Display commands which have a speech file assigned to them.
WARNING: you should only ever use eSpeechVoiceOnly at the player's request to do so, because there is no guarantee that they even have a sound card and so may not understand what is going on.
Example:
if (IsSpeechVoxAvailable()==1)
SetVoiceMode(eSpeechVoiceAndText);
will set the voice mode to voice and text if the voice pack is available.