• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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