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

Playing a unit animation while moving

Status
Not open for further replies.
Level 7
Joined
Oct 14, 2008
Messages
340
Hey Hey, I'm creating a spell where the hero charges forward to the target point, becoming invulnerable and knocking units and trees out of the way. My problem is, how could i play a unit animation while moving him with triggers?

I want to create the illusion that i have him running, when i'm actually moving him with a timer, so that I can have him moving faster than the maximum movement speed of 522.

Thanks.
 
Level 7
Joined
Oct 14, 2008
Messages
340
Yeah, I'm using jass, I've found a solution to this problem..
JASS:
call SetUnitAnimation(unit whichUnit, string whichAnimation)

will not really play the animation all the way through for whatever reason, while:

JASS:
call SetUnitAnimationByIndex(unit whichUnit, integer whichAnimation)

Will constantly loop the animation regardless of what the unit is doing until you reset it's animation, which is what i needed, I just needed to find the integer for his walk fast animation and bam it worked. :eek:

+rep for helping out though
 
Status
Not open for further replies.
Top