Skip to main content

The "vngen_vox_replace" Function

Syntax#

vngen_vox_replace(name, sound, [fade], [ease]);
ArgumentTypeDescription
namestringThe ID of the vox entity to replace
soundsound/arrayThe new sound(s) to play
[fade]realOptional: Sets the duration of the fade transition, in seconds
[ease]integer/macroOptional: Sets the ease mode to perform the transition in

Description#

Replaces the input entity ID with a new sound or array of sounds and fades the old sound(s) to the new one(s) over the input duration. Playback position and other properties will be synchronized between sounds.

As with other types of modifications, replacements made with this script are permanent and will persist until another replacement is performed. This script cannot be performed simultaneously with other replacement actions operating on the same entity ID.

See Macros & Keywords for a list of available ease modes.

Example#

if (vngen_event()) {
vngen_vox_replace("John Doe", vox_happy);
}