How do I Set a Sound Effect To A Specific Animation Frame?

0 favourites
  • 5 posts
From the Asset Store
Grenade Sound Library contains: 135 sounds 50 grenade sounds and 85 surface sounds
  • My sprite has several animations, and I'd like to begin adding sound effects to each of them at specific frames. However, the Audio action that I add after an event doesn't seem to have any options for that?

    I found something called Compare Frame once (Of course I can't find it now) but it only had options for the current animation, which I'm guessing is the default, which is not the one I want.

  • "Compare Frame" is a Sprite condition. You can combine that with the "Is Playing" condition to check the animation as well.

  • I'm so sorry, but I'm extremely ignorant about all this. Can you be more specific? How should I set up my events sheet so that "SoundEffect" plays on Frame 10 of "Walking" animation, when "Walking" is not the default animation?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey there,

    Here's an example for you:

    In this example, you'll notice that I have a "once (while true)" qualifier in there. That's because this sprite only has one frame and is used as a backdrop. The method for your purposes is, otherwise, the same. If your animation is at "walking", compare frame to "10" and then set your sound to play.

    If you haven't done it yet, you'll also need to add the audio object to your project and import your sound.

  • OH GOD IT WORKED!!

    (New Event) > Player: Is animation "Walk" playing |

    >>Player: Animation frame = 10 |Audio: Play "Footstep" not looping at volume 0 dB (tag "")

    Thanks!

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