Trigger action when animation completes

i posted a post a while ago about animations being done and triggering it so here it is again... so I am trying to script a trigger on animations being done.

Heres my script piece on it: if(animation("shoot").isDone).

i have also tried : if(animation[("shoot")].isDone).

I don't know what else there is do you guys know anything else i could try. if so then post it on as the answer.

You'll want to use Animation Events to fire off a function call, documented here:

http://unity3d.com/support/documentation/ScriptReference/AnimationClip.AddEvent.html

http://unity3d.com/support/documentation/ScriptReference/AnimationEvent.html