play sound while the wheel spins only

Blitz3D Forums/Blitz3D Programming/play sound while the wheel spins only

assuming you have already loaded the sound (ie wheelspinsound=loadsound("something.wav") outside of your main
loop then on the first frame that the wheels start spinning, or when the user pulls the slot machine arm do this:

wheelspinchannel=playsound(wheelspinsound)

then when the wheels stop spinning run the command if soundplaying(wheelspinchannel)<>0 then stopchannel(wheelspinchannel)