Turn based game animation through mechanim

We’re creating a turn based game in unity 4 and are having some problems with the attack animation, every time a character attacks it just keeps looping over and over. The question is, how do we get it to only play once?

If mecanim animation can use animation event, then you can use an animation event to call a function to modify the value of your parameter.

I have only 2 hours of experience in mechanim, so I am not sure will this technique work or not. It’s worth a shot though, it will take only 5-10 minutes to test this.

Unity’s Guide on Animation Event