Sound on hit

This forum is currently in read-only mode.
From the Asset Store
12 unique hits, slashes and spells in transparent PNG sequences
  • What I'm asking is not the normal explosions on bullet but what conditions would I need to use to make a sound play when another object is over it? I know already that I need on object is over but how do I make it so the sound doesn't play once the object has gone off the other object?

  • but how do I make it so the sound doesn't play once the object has gone off the other object?

    Not quite sure what you mean by this. Are you not destroying the bullet when it hits the object in the first place? If you aren't, you probably should (unless you're not doing it on purpose), but either way the problem would probably be solved by using the Trigger Once condition.

  • The game I'm making is a magic game and when you cast your spell you can control it's direction with your mouse (If it's the right type of spell) and some of the enemies are quite (Very) big and my sound is just about one second long and some of the enemies are so big I've managed to keep the spell on them for about 5 seconds, And it still doesn't kill them. But every time I... ...(would pausing the sound work?)... ...Is there a way to trigger something if it isn't on another?

  • Alright, I think I get what you mean. You want the sound to keep playing while the spell is over the enemy, and then stop once it's off, right?

    That's a little trickier than a normal sound effect, but it's doable. You should load the second effect into a specific channel first and set it to loop(make sure the effect actually sounds good when looping!), and play it while the spell overlaps the enemy. Add another condition that says when the spell DOESN'T overlap the enemy, stop playing that channel.

    It's possible there's a simpler way to do it, but I did a similar thing in my own game using this and it works fine.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What's the condition when it doesn't overlap

  • You can invert conditions if you right click them, so make another condition where they overlap and invert it. An inverted "This overlaps this" means "This doesn't overlap this".

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