I need to have an ambient sound of a phone ringing but there needs to be a time gap between each ring...obviously. How do I do it?
insert silence into the sound file after the phone ring
AAAwwwwwww.
I was afraid you'd say that! Doing that only adds to the size of the file which is annoying.
I would like to suggest for AGS a variable that creates a time gap between the repeating of ambient sounds.
Say if the ambient noise is birds tweeting in a forest, you don't wanna hear them constantly instantly over and over again. They should have time to rest their lungs. Surely otherwise, they'd lose their voices.
Why am I bothering to say this?
Can't you jsut use a timer and play a regular sound?
Something like:
SetTimer(1,300);
When the phone starts ringing and
if(IsTimerExpired(1)==1) {
PlaySound(1);
SetTimer(1,300);
}
in the repeatedly_execute script.
Yes, ambient sounds are designed for constant background noises like machines humming and so forth.
For incidental sound effects like a bird chirping, just use a normal PlaySound on a timer.
Why don`t you tie the sound into the animation of the phone ringing.....
So it plays sample when the phone anim...moves...and put a still frame with a time delay.......in the view.
The you can control it by using object animate......when character picks up u just stop animation...
foz
unfortunately the phone rings only during a blocking cutscene. I guess I'll have to do it avo's way!
could you change the volume of the ambient sound?
alternating the volume between very low and normal would give it a gap
Actually, Foz's way would be the best. There's no additional scripting, and it won't increase the file size.
Doin it foz's way you can use 2 frames with the same sprite, one with sound and the other without, if you don't have an animation for the ringing phone.
ah yeah! Sorry foz. I guess i missed your post. Thats a good idea. I wish i thought of it.
Thanx.
Sorted!