How do I stop a specific sound?

0 favourites
  • 5 posts
From the Asset Store
Best soundtracks for any game. High quality and engaging assets.
  • 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

  • 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.

  • 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

  • Hmm... Weird. Anyway sorry, I didn't say how to add an audio tag, but glad I could help.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)