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

How do you play a unit animation with a long name

Status
Not open for further replies.
Level 3
Joined
Apr 16, 2016
Messages
28
image.png


How do you make an ability play animations like the one shown above?

In the Art - Animation names of the object editor, I've tried to put

Spell Slam - 6 as one line

and

Spell
Slam
-
6

Separately as four lines. Neither of them works.
 
Not sure how picky the data field is, but I'm pretty sure "spell,slam,6" is the way to do it, so no hyphen. However, something tells me that the "6" won't register and it will just play "spell,slam", whatever that may be. I don't tinker around with object editor data fields often :p if you really want to have control over what animation is played, you can always trigger it using SetUnitAnimationByIndex().
 
Level 3
Joined
Apr 16, 2016
Messages
28
Not sure how picky the data field is, but I'm pretty sure "spell,slam,6" is the way to do it, so no hyphen. However, something tells me that the "6" won't register and it will just play "spell,slam", whatever that may be. I don't tinker around with object editor data fields often :p if you really want to have control over what animation is played, you can always trigger it using SetUnitAnimationByIndex().

This is a channel based ability though.. so triggering won't work in this case :( unless if I base it off another ability. Trying to avoid that unless absolutely necessary
 
Level 11
Joined
Oct 9, 2015
Messages
721
Abilities based on channel can be animation-triggered, you need to:
  • Unit - Pause Unit
  • Animation - Play unit animation
  • Unit - Unpause Unit
You can also replace the normal "Animation" action with the custom script: "SetUnitAnimationByIndex"
 
Level 3
Joined
Feb 15, 2008
Messages
20
Abilities based on channel can be animation-triggered, you need to:
  • Unit - Pause Unit
  • Animation - Play unit animation
  • Unit - Unpause Unit
You can also replace the normal "Animation" action with the custom script: "SetUnitAnimationByIndex"

This doesn't work with SetUnitAnimationByIndex.
 
Level 11
Joined
Oct 9, 2015
Messages
721
I'm actually using this exact same thing in my map
  • Unit - Pause MyUnit
  • Custom script: call SetUnitAnimationByIndex(udg_MyUnit, 1)
  • Unit - Unpause MyUnit
I think you need to set the unit's Art - Animation Backswing and Art - Cast Point both to 0 (on the unit data in object editor) But I'm not sure if it's strictly necessary for it to work!
 
Level 3
Joined
Feb 15, 2008
Messages
20
Hmmm, I just tested this again and it worked. Not sure what the issue was that I had with it. I probably mixed something up. You are correct about having to edit those data fields though if you intend to use this as a cast animation, because an unpaused unit will resume its last order and that makes the "on cast" event unusable.
 
Status
Not open for further replies.
Top