OK when I play a wave like
usr <<sound('Birds.wav',1)I want it to play as long as your in a spot but How can I stop the wav when Its needed to?
ID:147795
Nov 23 2003, 3:37 pm
|
|
In response to ZDarkGoku
|
|
ZDarkGoku wrote:
turf This will cause and infinite loop, and (in most cases) will crash the game. Not to mention the evilness of GOTO. :P |
In response to Malver
|
|
Malver wrote:
This will cause and infinite loop, and (in most cases) will crash the game. Not to mention the evilness of GOTO. :P And the evilness of usr in Enter(). I'd suggest playing the sound with the repeat option on, and setting it to a specific sound channel (from 1 to 8). When you want it to stop, play "null" with wait=0 and the same channel specfied. (Not sure if this actually works, but if it doesn't then it should. =P ) <code>sound('blah.wav', 1, channel=3) //Turn on sound(null, wait=0, channel=3) //Turn off</code> |
Enter()
loopsound
usr <<sound('Birds.wav',1)
goto loopsound