How do I stop a specific sound?

Get help using Construct 2

Post » Mon Jan 15, 2018 7:09 pm

I am trying to make it so you can activate and deactivate a fire. Everything works fine except the sound. I can get the sound to play at the object location, but it will not stop. What am I doing wrong? Below is an image of the expression.

https://imgur.com/SBJjL09
B
6
S
1
Posts: 6
Reputation: 362

Post » Mon Jan 15, 2018 7:23 pm

When you Stop a sound, you don't put the name of the sound, you put the tag of the sound. Add a tag to the sound called "Snd_Fire" (Or anything.) and then stop the tag.
B
25
S
4
Posts: 74
Reputation: 1,346

Post » Mon Jan 15, 2018 7:43 pm

Thanks! I had to look up how to add a tag to the sound. This seems like a very strange and unnecesary way for Construct 2 to handle stopping sounds, but it works.

What's especially strange is, I have stopped sounds before without a tag. The following expressions worked perfectly before. I only changed them so I could add the creation/stop of sound to the activation/deactivation of the fire all in one expression.

Obj_Fire-On Created>Play Snd_Fire at Obj_Fire

Obj_Fire-On Destroyed>Stop Snd_Fire
B
6
S
1
Posts: 6
Reputation: 362

Post » Mon Jan 15, 2018 11:41 pm

Hmm... Weird. Anyway sorry, I didn't say how to add an audio tag, but glad I could help.
B
25
S
4
Posts: 74
Reputation: 1,346

Post » Wed Jan 17, 2018 8:31 am

After reviewing this further, it shuts off all instances of the audio, instead of just the audio at the location with which I am interacting. I've been trying to fix it for 2 hours with no luck. Is there a solution? Is there a way to create a tag that is unique to that 1 object?
B
6
S
1
Posts: 6
Reputation: 362


Return to How do I....?

Who is online

Users browsing this forum: DarthPapalo666, krls and 57 guests