function MusicControl::changeMusicFile(%this)
{
   alxStop(%this.musicHandle);
   %this.musicHandle = alxPlay("ambientMusic" @ getRandom(0, 6));
   %this.schedule(14769, "changeMusicFile");
}

new ScriptObject(musicController)
{
   class = "MusicControl";
   musicHandle = "";
};