Need help looping sounds!
I have a set_task that is called every 0.01 seconds.
I want to loop a 1 second long sound inside of this set_task. How would I do this? |
Re: Need help looping sounds!
You can't, you will have to make a function,
don't know if this is good for you, but it should work. Code:
|
Re: Need help looping sounds!
I'm actually kind of wondering why this method won't work:
PHP Code:
|
Re: Need help looping sounds!
well first of all, you don't execute 'My_0.01_settask', but the problem is that that function isn't really looped, or executed every frame.
So this check: if(SoundTimer[id]-halflife_time()>1.0) is only called one time. |
Re: Need help looping sounds!
I was implying that I had a settask looping it. I'll fix that.
|
Re: Need help looping sounds!
you should also put 'public' infront of 'My_0.01_settask(id)'
|
Re: Need help looping sounds!
...piddly stuff aside, how can I make this work in theory.
|
Re: Need help looping sounds!
SoundTimer[id]-halflife_time() will be a negative value. You want to do this the other way around.
|
Re: Need help looping sounds!
AH! *gives you 18 flies* :)
|
Re: Need help looping sounds!
Hmm, well it works great, but I have another question. Is there a way to play only part of a sound? Once you tap your jetpack key once, you're committed to playing the whole one second sound loop, and it's kind of awkward.
|
| All times are GMT -4. The time now is 22:24. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.