How do I stop a sound

Get help using Construct 2

Post » Thu Oct 23, 2014 11:27 am

Every time I start my game a sound that I don't want to play goes off just once!
The sound is the gun sound for the enemy. It also goes off when it supposed to.
Any ideas anyone.
Cheers
Matthew
B
34
S
3
G
1
Posts: 46
Reputation: 1,670

Post » Thu Oct 23, 2014 8:11 pm

Does the enemy fire automatically during the game? Ie. is he scripted to begin shooting as soon as he is created?

If so your problem is that the off-screen instance of the object is doing like its told to, game starts, I got to fire... pew,pew,pew...

My off-screen explosion orbs were doing this in my space shooter (in my sig) since they are timed to explode after creation so they drift a little first. I used an audio tag on them called orb and then made a variable called canExplode, set it to 0 by default and then 1 after waves are >1 (my waves are currently 7 seconds).. they still explode but by then the enemies are on you and you never notice. Its all about what works for you. I still have a shot at start I have to hunt down, but I will get him next update when I add music volume slider.. :)

Your only other option I know of would be to trigger their start after game starts instead of making them active at start.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
68
S
17
G
8
Posts: 637
Reputation: 9,420

Post » Fri Oct 24, 2014 2:31 am

Make the sound play at the enemy position And on start of layout Set the listener to the player And change the Roll of factor value for the Audio plugin options.
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155


Return to How do I....?

Who is online

Users browsing this forum: beohs, Blendi1223 and 12 guests