01-21-2024, 04:50 AM
(01-20-2024, 09:33 PM)Marcus Wrote: 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.
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.
I've had a look at the ngui library in the past for this type of program, but wasn't able to work out how to apply it, so I would certainly appreciate seeing some examples Marcus.