Ah, that makes it a lot easier to find good parameters
I added a hack to unflag the mousebutton when the user clicks "PLAY SOUND", because I kept getting multiple instances of the sound effect playing.
Maybe I should write some examples on how to use the ngui library that NED and all the included editors are using. It makes it easier to make these type of programs.
I added a hack to unflag the mousebutton when the user clicks "PLAY SOUND", because I kept getting multiple instances of the sound effect playing.
Code:
...
if mousebutton(0)
if mousey() > 60 and mousey() < 110
if mousex() > 20 and mousex() < 220
tmp = mousebutton(0, true) ' mousebutton will return false until it has been
' released and pressed again.
play_sound = true
laserShotSnd = CreateSquareSfx(duration, startFreq, endFreq, fadeOut, sampleRate)
play sound laserShotSnd
endif
endif
endif
...
Maybe I should write some examples on how to use the ngui library that NED and all the included editors are using. It makes it easier to make these type of programs.