how do i make only one animation of an actor do something?

how can i make one animation of an actor hurt an enemy?like when i want to attak an enemy i push space and it changes the animation to link attaking with his sword.how do i make it where only that animation hurts the enemy and the other animation get hurt by him?(like link walking)