Scorpyo,
May I modify your sample code by placing a
SOUND PLAYING(snd#) command within it?
PLEASE HELP ME,
The snippet below uses the command by itself.
if spacekey()=1
if SOUND PLAYING(snd#) = 0 then PLAY SOUND snd#
endif
However, if your sound has no silence in it at its ending, speaking of the .wav file itself, and you would like there to be some. Either, edit the sound by adding a moment or two of silence, or implement Scropyo's and my ideas togehter. Like this:
if spacekey() = 1
if SOUND PLAYING(snd#) = 0 and soundcounter = 15
PLAY SOUND snd#
soundcounter = 0
endif
REM << this line creates the delay in between the sound looping,it starts counting
REM << when spacekey is pressed and the sound has stopped playing
if soundcounter < 15 and SOUND PLAYING(snd#) = 0 then inc soundcounter
endif
REM << here, soundcounter will be reset in preparation to play the sound AS SOON as the spackey is pressed next time
if spacekey() = 0 and soundcounter < 15 then soundcounter = 15
+NanoBrain+