GML: sound_fade( )
sound_fade() - Changes the volume level of a sound over time.
Syntax
sound_fade(sound_name,volume,time_in_milliseconds)
- sound_name - name of the sound
- volume - ending volume number between 0 and 1
- time_in_milliseconds
Explanation
This will change the sound_name's volume from its current volume, to the volume indicated in the amount of time indicated.
For volume, a value of 1 indicates the normal volume of the sound, and a sound of 0 indicates no volume at all.
This is useful when you want to gradually fade a sound out, or crossfade two sounds. The most common use applicable to this function is the reduction of volume in a sound at the end of a level or story sequence.
Examples
Example Title
Short description.
// code of example
Related Pages
GML
- sound_loop()
- sound_play()
- sound_volume()
Backlinks
| Categories: Functions : GML : Sound |