Interrupt Enemy Attacks?

How do you interrupt the Enemy from attacking when the main character has attacked first?

In this case I am using “Line Trace for Objects” and Apply Damage once the enemy sees the main character and later attacks by reducing his
HP.

Is there a way to make the enemy stop attacking when enemy has received HP reduction/damage?