Loop sound problem.

For questions about using Classic.

Post » Sat Jan 09, 2010 12:50 am

Hi.

I have the problem of the sound looping.

What I want is to play a sound when player keep pressing C key, and the sound should be looping UNTIL the player release the C key. The problem is that if I play the sound in loop, it keeps in loop forever, there is no way to stop it. Playing the sound in a channel and then stop it won't work because that ruins all of my sounds.

Is there a way to fix that?

Thank you!,
Carlos.
?When everyone feels hope at the same time, wonderful things can happen.
B
5
G
3
Posts: 67
Reputation: 1,059

Post » Sat Jan 09, 2010 1:30 am

Although it may not be optimal, playing the sound in a channel of its own should work.

Edit: here's a .cap showing this. Press "space" to play a shooting sound. When you release space, it stops the sound, but those in the background do not stop playing.

You might want to turn the sound down, because the ones in the background could be quite annoying. Just sayin'.
B
3
G
3
Posts: 46
Reputation: 967

Post » Sat Jan 09, 2010 3:42 am

Thank you, I've solved the problem. I loaded the first sound in channel 5, then stoped the channel 5 and started the channel 6 in a loop, then when the player release C, channel 6 is stopped.
?When everyone feels hope at the same time, wonderful things can happen.
B
5
G
3
Posts: 67
Reputation: 1,059


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests