quick time event

i want to make a quick time event by an ai(hero) running to another ai(enemy) and then attack while that happens there is a loading bar that starts when the ai(hero) start running until it hits the other ai(enemy) with the attack if you quick time event then succeeds the ai(hero) will do the attack again i want to make something like this

So, whats the question?

what is the best way according to yo i cant make the loading bar line up to the ai

You for sure need to know how long you animation is and what the progress of the animation is currently.