Set duration of an animation sequenz


I have a unit with attackspeed and I want the attack animation of this unit be the same length as the attack speed so that when the animation is finished the damage is applied and it looks smooth. Now my animation is always playing at the same speed and that looks really odd because sometimes damage is dealt at the beginning of the animation sometimes at the middle etc…

I couldn’t really find any help on this topic maybe can give me some info how I would implement this.

Stretching or shortening Animations might look really wierd, and inaccurate you’d have to play with the playrate, also keeping in mind you may want to reuse code like applying damage for different animations or weapons or whatever I would suggest using Animation Notifies to apply damage :), using your attackspeed as a pause until your animation is called again instead.