Change location of sound

Hey folks,

I’m working on a shooter right now and want to add some bullet impact sounds based on the material the player is shooting at. The different materials should be changed by a parameter. The shooting is done via line trace. This is what I got so far:

Everything is working fine except the fact, that the sounds are played back at the player’s location, as the FMOD audio component is attached to the player. So I tried to change the location of the sound using this:

Now the sounds are located at the impact point of the line trace, but the parameter change is not working, as the “Play Event Attached” node is a one shot sound, that doesn’t take parameter changes into account.

Is there a way to change the location of a sound AND manipulate it with a parameter?

In your second picture, you are calling ‘Set Parameter’ and ‘Play Event Attached’ on different event instances.

What I would recommend is using ‘Play Event at Location’ which plays a one-shot and returns an FMODEventInstance (instead of using a whole new component) and set the parameter on that.

Or using the return node of Play Event Attached (which returns a new FMODAudioComponent) to set the parameter.

1 Like

Thank you very much! Works like a charm. I didn’t know it was possible to set a parameter on one shot events. Very useful