Play a sound the right way while key is pressed? [Solved]

Get help using Construct 2

Post » Mon Apr 13, 2015 9:24 pm

Hi,
I want to play a sound looping while X key is down.
I want the sound to loop, but no the way is looping now. Right now it plays over itself, it doesn't wait to the sound to be finished to loop, so it plays awful.

Here's my Events:
Image

I need the sound to loop and the animation to loop, so if I put a Play Once While True condition it doesn't work.

Any ideas?
Thanks :shock:
Last edited by gleegum on Mon Apr 13, 2015 10:19 pm, edited 2 times in total.
B
5
S
1
Posts: 42
Reputation: 471

Post » Mon Apr 13, 2015 9:30 pm

Add a subevent and check "Is tag playing". If not, then play. Use an Else on 32 to Stop the sound.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Mon Apr 13, 2015 10:03 pm

Wow! thanks it works!

Now I have another issue...
I would like to play a sound, not looping when the last sound stops playing.

I added an event but isn't working.
Here's my events again:
Image
B
5
S
1
Posts: 42
Reputation: 471

Post » Mon Apr 13, 2015 10:18 pm

forget it, I solved it adding On X released > play sound.

Thanks!!
B
5
S
1
Posts: 42
Reputation: 471


Return to How do I....?

Who is online

Users browsing this forum: Armench, brunopalermo, MeteoorSC, TRMG and 32 guests