Stop event with game object destroy?

This should be straight forward but it is not working. I have a projectile gets instantiated and destroys itself after impact… but the sound (which is longer than the projectile can last) keeps playing… so eventually there are LOTS of them playing… What am I doing wrong?

Screen Shot 2020-06-01 at 9.30.03 AM

anyone know why this isn’t working?

Could you please try unchecking the box that says “Allow Fadeout When”? It’s possible that there is something in the event preventing it from stopping immediately.

thanks for the suggestion but unfortunately it didn’t work.

I even tried to play it with code

public void AttachAudio(string eventToPlay)
            fmodInstance = FMODUnity.RuntimeManager.CreateInstance(eventToPlay);
            FMODUnity.RuntimeManager.AttachInstanceToGameObject(fmodInstance, transform, rigidbody);

in fact even if I put


before the destroy, it doesn’t stop.

I’ve even tried a double whammy in an OnDestroy() and it still doesn’t work…

private void OnDestroy()
                fmodInstance.setParameterByName(parameterOnDestroy, 1f, false);

parameterOnDestroy is a parameter which, at 1, turns the volume of the event all the way down… it still plays… I’m baffled

well… I feel stupid… and I’m sorry to have taken up so much of your energy for an error on my part…

after seeing that it wouldn’t destroy OR turn down… I realized there must be something wrong somewhere else… and the was another game object triggering the sound so that there were 2… one of them didn’t have a stop command… I’m sorry. Thank you for the help, just discussing it lead me to the answer eventually