Code:
SOUND*snd1="shdfkdh.wav";
SOUND*snd2="shdfkfsddh.wav";
SOUND*snd3="shdfksdffddh.wav";

function playrandomsound()
{
   var i=integer(random(3));
   switch(i)
   {
      case 0:
      snd_play(sound1...); break;
      case 1:
      snd_play(sound2...); break;
      case 2:
      snd_play(sound3...); break;
   }
}




Now you have to call the function playrandomsound if you want to hear your Sound.

Edit: if "random_seed(0);" don`t work, make a update, it is the newer function from randomize.

Last edited by Widi; 02/08/10 22:00.