I am making a program , and I want it to play a random sound each time an image collides with another image .I have 8 different sound, but I don't know how to do it. Any help please?
question
Blitz3D Forums/Blitz3D Beginners Area/question Create an array that will be used hold the handle to each sound
Dim Sound(8)then load each sound into one of the array elements
For iter = 1 to 8 Sound(iter) = LoadSound("sound" + iter + ".ogg") ;sound1.ogg, sound2.ogg, etc. Nextthen when you want a sound to play, use a Random statement to select one of the sounds
PlaySound(Sound(Rand(1, 8)))
great thx man