i dont know what your mean.
how can i do that?
There is no good way to do this as far as I know.
You can manually check how long the animation lasts in the model preview window and then just wait that long with the code. However all units do obviously not have attack animations that last for exactly the same time so in some maps it wont work.
If you decide to wait for one second it will more or less suit most animaions because they are between 0.8 and 1.5 seconds most of the time.
I'll assume you want to deal damage after the animation, then in that case you could use:
with the Channel Ability with a Follow Through Time.
Events
Unit - Unit Finishes Casting An Ability
The Follow Through Time will dictate how long the unit will play the animation before the effects start, so go trial and error until you find the appropriate Follow Through Time that matches the animation.
Note: It may not match every unit type's attack animation.
A common misconceptionand if i use wait, the spell not MUI anymore
After reading the description, I'm pretty sure my suggestiion would work. But meh, too lazy to create a test map.and this does'nt work ;-;
After reading the description, I'm pretty sure my suggestiion would work. But meh, too lazy to create a test map.
It would not.
The animation duration is (likely) not the same of all units. Thus the animation is not necessarily finished when the spell goes on cooldown. Do not confuse animation with cast time.
Would be kinda funny if stormbolt had a 1 second cast time (due the animation being 1 second long) while it has a 2 second casttime for a paladin (just an example).
You might have to use an integer or real if you want it to be MUI, and make a timer using them. If the animation is 0.66s long, you would pry want the periodic trigger run every 0.03s, and set the integer for that instance at 22.
Every time it runs, it checks to see if the integer is at 0, and if it is then run the spell or whatever. The integer variable would have to be an array, of course, but this could definitely be MUI.
A common misconception
You might have to use an integer or real if you want it to be MUI, and make a timer using them. If the animation is 0.66s long, you would pry want the periodic trigger run every 0.03s, and set the integer for that instance at 22.
Every time it runs, it checks to see if the integer is at 0, and if it is then run the spell or whatever. The integer variable would have to be an array, of course, but this could definitely be MUI.