• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How do i make a unit's ability sync with its animation?

Status
Not open for further replies.
Level 4
Joined
Dec 29, 2009
Messages
69
Hey guys i was wondering if anyone could tell me how to make a unit's animation sync with the ability it's casting as when a unit on my map casts an ability the projectile is fired before it could finish its animation, is there any way to make the projectile fire AFTER or when the unit has finished its animation?

Thanks in advance
 
Level 5
Joined
May 31, 2009
Messages
122
You can go to the ability, and change the "stats-casting time", so that it takes longer to cast the ability (since the animation is cued when you start to cast the ability". If you time it properly, then it should turn out to:
Ability cued-->Animation-->projectile is fired

You can also go to the unit with the spell in object editor, then under "Art-Animation cast backswing" you can lower the value, so that his animation time takes less time. however, i think this might also affect the attacking backswing.
 
Level 4
Joined
Dec 29, 2009
Messages
69
No it's not a trigger spell, it's basically storm bolt but with a greater range and a different projectile, i'm trying to turn it into a one hit sniping kill
 
Level 4
Joined
Dec 29, 2009
Messages
69
I have done but the only thing that does is make the delay before the skill can be casted longer, the projectile still shoots out earlier than the animation
 
Level 5
Joined
May 31, 2009
Messages
122
I have done but the only thing that does is make the delay before the skill can be casted longer, the projectile still shoots out earlier than the animation

hmmm...

Wait... What unit are you animating it for? Because if the unit doesnt have a Channeling animation, then the spell casting delay wont work (he'll just sit there looking dumb).

But, you could trigger it so:

  • Event - Unit begins casting an ability
  • Condition - Ability is equal to (sniping bolt thing)
  • Actions
    • Animation - Play casting unit's (attack or spell animation; whichever one you want )
With this one, if you add the delay, this should happen:

Spell is cued --> Animation is played during the channeling/delay time ---> Bolt is fired out
 
Level 4
Joined
Dec 29, 2009
Messages
69
Thanks for putting the effort into this Vestri :D
And as for the trigger thing, I'm having a few problems with the animations. The default casting animation of the model is called Spell Throw on the model preview on the left hand side, and the animation i want to use is called Attack Slam, this is the name that i entered on the animation action "Play casting unit's Attack Slam animation", when it casts the ability the default animation is played even when i put in "Remove the Spell Throw Animation Tag"
 
Level 5
Joined
May 31, 2009
Messages
122
Thanks for putting the effort into this Vestri :D
And as for the trigger thing, I'm having a few problems with the animations. The default casting animation of the model is called Spell Throw on the model preview on the left hand side, and the animation i want to use is called Attack Slam, this is the name that i entered on the animation action "Play casting unit's Attack Slam animation", when it casts the ability the default animation is played even when i put in "Remove the Spell Throw Animation Tag"

lol.... xD

Okay, go to the ability, and under "Art-Animation Names", it should be "spell,throw"; change this to "spell,slam".

If you have problems with the delay and stuff, then the triggers + cast delay will fix that. But just changing the animation should cue the slam animation instead.

Good luck with your map!
 
Level 4
Joined
Dec 29, 2009
Messages
69
So i've set the animation on the spell to spell,slam and set the play animation to play spell,slam but everytime the unit casts the ability it's still using the default Spell Throw animation :(
 
Level 5
Joined
May 31, 2009
Messages
122
So i've set the animation on the spell to spell,slam and set the play animation to play spell,slam but everytime the unit casts the ability it's still using the default Spell Throw animation :(

Oops, sorry i forgot one little thing. Remove the "Spell" part, and just leave the "slam" string. What happens is that if the unit has both, the animation before the others takes priority, and "spell" by default cues the unit's default spell casting animation. If you just leave "slam", then it will only cue the slam animation.

The reason why there are two sometimes, is so that animations dont get glitchy when you have channeling spells, for instance.
 
Level 4
Joined
Dec 29, 2009
Messages
69
The unit only starts playing the animation after the Cast time delay (1.4s) and not when it starts casting the ability :(

This is the trigger

  • Snipe start
    • Events
      • Unit - Marksman 0310 <gen> Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Snipe
    • Actions
      • Animation - Play Marksman 0310 <gen>'s slam animation
      • Animation - Change (Target unit of ability being cast)'s animation speed to 60.00% of its original speed
      • Animation - Change Marksman 0310 <gen>'s animation speed to 40.00% of its original speed
      • Special Effect - Create a special effect attached to the weapon of Marksman 0310 <gen> using Abilities\Spells\Orc\Bloodlust\BloodlustTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the weapon of Marksman 0310 <gen> using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the overhead of (Target unit of ability being cast) using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
 
Level 5
Joined
May 31, 2009
Messages
122
Change the "Begins casting an ability" to "begins channeling" an ability; i think that should work.

One of the annoying things about WE is that if two animations are cued, they will interrupt, so you have to add a wait action, and reset the animation (i just learned this lol)

  • finally....
    • Events
      • Unit - Marksman 0310 <gen> Begins Channeling an ability
    • Conditions
      • (Ability being cast) Equal to Snipe
    • Actions
      • Wait (0.01) seconds
      • Animation - Reset Marksman 0310 <gen>'s animation
      • Animation - Play Marksman <310>'s slam animation
      • --- all that other stuff...
 
Level 4
Joined
Dec 29, 2009
Messages
69
The animation is still not syncing with the ability

  • Snipe start
    • Events
      • Unit - Marksman 0310 <gen> Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Snipe
    • Actions
      • Wait 0.01 seconds
      • Animation - Reset Marksman 0310 <gen>'s animation
      • Animation - Change Marksman 0310 <gen>'s animation speed to 40.00% of its original speed
      • Animation - Play Marksman 0310 <gen>'s slam animation
      • Animation - Change (Target unit of ability being cast)'s animation speed to 60.00% of its original speed
      • Special Effect - Create a special effect attached to the weapon of Marksman 0310 <gen> using Abilities\Spells\Orc\Bloodlust\BloodlustTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the weapon of Marksman 0310 <gen> using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the overhead of (Target unit of ability being cast) using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
You want me to send you the actual map to look at it? You can test it for me if you want ;D
 
Level 7
Joined
Oct 14, 2008
Messages
340
You really shouldn't have to fiddle around with triggers, just manipulate the two fields in the object editor
Cast Backswing
Cast Point
 
Status
Not open for further replies.
Top