Sword Slash Animation

I was wondering how to make a sword combo animation where you would click once to do one slash and click again to do a different slash and so on?

Well, you could create a counter, for instance we take the variable var slash:int=0;
if the a click happens slash++;(increase it by 1). You could then create several animations corresponding to the amount of maximum slashes.

If we click 3 times, you will get: var anim1:Animation;,var anim2:Animation;,var anim3:Animation;


and then you can make if statements calling the animations.


Note this isn’t actualy working code, but it should put you on the right idea.
And of course there is still mecanim. would be the same idea but with smooth animation blending.