Animation events and blend weights.

Hi, I’m having trouble with multiple animation events getting triggered. I basically have 3 different animations that blend from one to the other. There’s an animation event that fires in each animation at the same time. But I only want one of them to fire which I would like to be dependant on the animation that’s playing at the time with the dominant weight.

I have seen meany threads in which they’ve said that this is a known bug and has been fixed, and then later on down the thread it’s not been fixed.

I’ve also seen threads that mention using curves but it seams to be on animations that have been imported where as my animations are created with in unity so I don’t get the options within the inspector.

This is a screen shot of how its set up:

The following is what gets called:

    public void AttackTrace()
    {
            Debug.Log ("Start Trace" + traceCount);
            traceCount++;

    }

The Debug.Log shows that the event is being fired 3 times at once.

Is there any way around this?

Thanks

I’ve come up with the following:

public void AttackTrace()
    {
        if (anim.GetFloat ("armBlend") > 0)
        {
            StartTrace ();
        }
        else if (anim.GetFloat ("armBlend") < 0)
        {
            StartTrace ();
        }
        else if (anim.GetFloat ("armBlend") == 0)
        {
            StartTrace ();
        }
    }

    void StartTrace()
    {
        Debug.Log ("Start Trace" + traceCount);
        traceCount++;
    }

This works but it’s not ideal.
It seams to be the easiest away around it for now seeing as I only have 3 animations blending between each other.