• 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.

Animations

Status
Not open for further replies.
Level 11
Joined
Jun 26, 2014
Messages
513
How do I play an animation when a unit is moving. For example: You cast a spell which launches forward the hero in the desired direction. How do I make the hero play a certain animation while moving to the location?
 
Level 18
Joined
May 11, 2012
Messages
2,108
For that you will have to use SetUnitX/X to move the unit (so its orders are not interrupted).
Then you can play the animation, and when the moving is over, just reset its animation, or play another desired animation.

Replace your GUI move command with these 2 scripts:

  • Custom script: call SetUnitX("Your unit variable here", GetLocationX("Your moving point here"))
  • Custom script: call SetUnitY("Your unit variable here", GetLocationY("Your moving point here"))
 
Level 11
Joined
Jun 26, 2014
Messages
513
For that you will have to use SetUnitX/X to move the unit (so its orders are not interrupted).
Then you can play the animation, and when the moving is over, just reset its animation, or play another desired animation.

Replace your GUI move command with these 2 scripts:

  • Custom script: call SetUnitX("Your unit variable here", GetLocationX("Your moving point here"))
  • Custom script: call SetUnitY("Your unit variable here", GetLocationY("Your moving point here"))

Im not sure if I understand everything. Can you post with named variables or better send a test map. Thanks!
 
Status
Not open for further replies.
Top