The "vngen_audio_replace" Function
#
SyntaxArgument | Type | Description |
---|---|---|
id | real/string | The ID of the audio entity to replace |
sound | sound | The new sound to play |
[fade] | real | Optional: Sets the duration of the fade transition, in seconds |
[ease] | integer/macro | Optional: Sets the ease mode to perform the transition in |
#
DescriptionReplaces the input entity ID with a new sound and fades the old sound to the new one over the input duration. Playback position and other properties will be synchronized between sounds, making this function ideal for transitioning between music tracks.
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.