• 🏆 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!

Overriding Unit Animations

Status
Not open for further replies.
Level 19
Joined
Oct 29, 2007
Messages
1,184
Is there a way to override animations that are played when a unit casts an ability? I want to control the animations using scripts. My current solution only seems to work for walking animations. I set the animation index to integer every x of game time. When I order to play a different animation, the animation just freezes.

I need another solution. I tried disabeling the every x of game time event, in order to play the animation just once. This time the default animation triggered by the ability being cast was played instead of the one i ordered to.

Is it possible to gain more control over unit animations? Maybe there are some abilities that do not trigger animations on the caster. In that case which would those be? :)



PS: Also, if someone knows a clever way to get rid of command buttons on units without making them wards, so that abilities still can be casted that would be very useful to know!
 
Well, the only way to be sure of setting an animation is SetUnitAnimationByIndex(), but I guess that is what you are using. It is weird that it is not working for you though, you should try pausing the unit first and then unpausing it afterward. Or try setting its animation to "stand" and then setting it to the appropriate index.

As far as abilities without animations go, I'm pretty sure divine shield doesn't use an animation. Or wind walk.
 
Status
Not open for further replies.
Top