# MusicLevel

Music
4.6.5.0 CP
int
int level Desired volume (0-100).
Sets the volume for playback of background music (see Music).
local volume;

func Initialize() { volume = 100; }

func Timer() { volume--; MusicLevel(volume); if(volume <= 0) { Music(); RemoveObject(); } }
Script for an object which will fade out background music: the "Timer" function will decrease the volume step by step until it is 0. Then the music will be turned off and the helper object deleted.
Music
PeterW
2003-02