The "vngen_vox_play" Function
#
SyntaxArgument | Type | Description |
---|---|---|
name | string | The ID of the speaking character to associate with this sound |
sound | sound/array | The sound resource to play |
pitch_min | real (0-255) | The minimum pitch multiplier, where 1 is default |
pitch_max | real (0-255) | The maximum pitch multiplier, where 1 is default |
volume | real (0-1) | The sound volume, where 1 is default and 0 is silent |
#
DescriptionUnlike other sound actions, this script does not play a sound right away, but rather assigns a sound or array of sounds to be played whenever the specified character is speaking. This sound will be looped for the duration of the text typewriter effect to fill in for the absence of real voice audio. As such, it is recommended to use a brief 'blip' sound effect with this script. To further simulate a natural voice, pitch will be randomized between the min and max values each time text increments on the screen.
If multiple sounds are supplied in an array, a sound will be chosen at random each time text increments on the screen. Additional sounds can also be added or removed later with the vngen_vox_add
and vngen_vox_remove
functions.
Vox audio actions will be marked complete immediately and will not delay the next event until any fade transition is complete. Vox will be paused if vngen_toggle_pause
is run.