The "vngen_set_vol" Function

Syntax#

vngen_set_vol(type, vol, [fade]);
ArgumentTypeDescription
typeinteger/macro/keywordSets the type of sound to modify (use keyword 'all' for all types)
volumereal (0-1)Sets the global sound volume, where 1 is default and 0 is silent
[fade]realOptional: Sets the length of time to fade between volumes, in seconds

Description#

Sets the global volume multiplier for VNgen sound, music, voice, and other audio. Note that this volume is an offset, not an override, and is relative to any volume set in audio actions themselves. Also note that not all sounds support fading between volume levels.

See Macros & Keywords for a full list of available audio types.

Example#

vngen_set_vol(all, 0.5);
vngen_set_vol(audio_type_music, 0.8, 3);