Script Canvas: Listen for animation event and trigger audio

Hi All,

I’m trying to listen for an animation event (i.e.,“weapon_fire”) and then play an audio trigger.

Having a hard time figuring out which Script Canvas bits I need to make this happen. Please see attached reference image.

Appreciate any help!

hey crogue, sorry for late response, I forget to check forums and even the reddit from time to time

So to fire an audio trigger make sure you have the audio trigger and audio proxy component on the entity where the SC graph lives, and leave it bank. 3 ways you can handle this:

  1. play the sound on the input event that shoots the weapon after you have done your ammo checks to see if the weapon can fire (easiest)

  2. using motion events that are set up in the EmotionFX editor ( i’ll have video tutorials on this in a few days)

3.the way you’re doing it, but your setup will look more like this:

using the character animation event variable to get or set your values…

or to simplify, something like this should get you going:

Hope this helps and/or points you in the right direction if you havent solved this already!.

1 Like