Stop a sound activated by mouse

Get help using Construct 2

Post » Sat Jan 26, 2013 10:30 pm

Hello,

Here's my problem :

I want my game to play a charging sound while I left click. It works perfectly, but I want to stop it when I release my click. I tried the ' stop"" ' and the ' stop"sound" ' in my ' On Left button released ' but it keep playing the sound, which is pretty annoying, i've got to say...

Can you help me ?

(sorry I cant post my .capx yet)


Thank you,

AstroChibi
B
2
Posts: 3
Reputation: 281

Post » Sat Jan 26, 2013 11:14 pm

Add Trigger once to Left button is down.
ImageImageImage
B
67
S
19
G
122
Posts: 3,202
Reputation: 73,391

Post » Sun Jan 27, 2013 10:53 am

The result is only that the sound start once, but I wanted to stop it when I release the button, which i cant manage
B
2
Posts: 3
Reputation: 281

Post » Sun Jan 27, 2013 11:14 am

Try making a variable for when the left clickis down.
For example: Left Click is down, set "Sound Fix" to 1. When Left Click is released, set "Sound Fix" to 0.
Then set compare the instance values and start/stop the sound from there :) I hope this worked
                      //superwifibattler
B
11
S
2
G
4
Posts: 78
Reputation: 3,292

Post » Sun Jan 27, 2013 11:35 am

Thank you so much !! That actually worked :)

B
2
Posts: 3
Reputation: 281


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Artpunk, indiegrimes, NRABrazil, PixelatedTrip, WhosWho and 26 guests