Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:3.6

Description

Description:

Substitutes any given sound path with a user-specified sound definition. This command takes the specified source and plays this sound file, when the specified target sound is accessed or requested.

Note: This command is not supported and should not be used for anything other than internal debugging. Any found bugs concerning this command should not be reported.

Syntax

Syntax:target setSubstitutedSound [source, pitch, db, ad]
Parameters:
  • target: String - Path to the sound file, which is substituted. The target path is not specific to case sensitivity and leading slash. Drive letters in the path are ignored by the engine.
  • source: String - Path to the sound file, which is used instead.
  • pitch: Number - Pitch of the substituted sound (does not have effect).
  • db: Number - Volume of the substituted sound in dB (does not have effect).
  • ad: Number - Audible distance of the substituted sound in meters (does not have effect).
Return Value:Nothing

Examples

Examples:
"\vbs2\sounds\data\sound\vbs2ng_ui\button_focus.wss" setSubstitutedSound ["C:\sounds\bounce.wav", 1, 2, 100];
"vbs2\sounds\data\sound\vbs2ng_ui\button_focus.wss" setSubstitutedSound ["C:\sounds\bounce.wav", 1, 2, 100]; 
"\VBS2\sounds\data\sound\vbs2ng_ui\button_focus.wss" setSubstitutedSound ["C:\sounds\bounce.wav", 1, 2, 100];
The outcome of all three cases is that "vbs2\sounds\data\sound\vbs2ng_ui\button_focus.wss" has been substituted with "C:\sounds\bounce.wav" with a dB value of 2 and an audible distance of 1000m. The change can be heard in main menu.

Additional Information

See also: getSubstitutedSounds, getSoundInfo
Multiplayer:
Problems:

Notes