The "vngen_audio_play_voice" Function


vngen_audio_play_voice(name, sound, volume, fade, [ease], [lang]);
namestringThe ID of the speaking character to match this sound to
soundsoundThe sound resource to play as voiceover
volumereal (0-1)The sound volume, where 1 is default and 0 is silent
faderealThe length of time to fade sound in, in seconds
[ease]integer/macroOptional: Sets the ease mode to perform the fade in
[lang]real/stringOptional: Sets the language flag for this action


Plays a new sound as voiceover with an optional fade in and volume control. Voiceover is never looped and will be paused if vngen_toggle_pause is run. Voice audio will be added to the backlog for the current event and will trigger facial animations for the associated character, if any.

See Macros & Keywords for a list of available ease modes. See Language Functions for details on multi-language support.


vngen_event() {
vngen_audio_play_voice("John Doe", snd_voice, 1, 0, ease_none);
vngen_audio_play_voice("John Doe", snd_voice, 1, 0, "en-US");