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

how do I make a unit play animation "attack 1"?

Status
Not open for further replies.
Level 6
Joined
Sep 15, 2015
Messages
211
you have to know under which index is the animation listed (e.g. War3Viewer shows animation in indexed order, starting with index 0) and then use the command
SetUnitAnimationByIndex(unit, index)

Is it work for Stand animations? I can't play stand animation of Grom with trigger.
 

Ardenian

A

Ardenian

Open the model in the Warcraft Model Editor, remove its spell animation, if it has one,
then rename 'Attack 1' to 'Spell'
Remove '-2' from the attack animation name ( everything done in the Sequence editor).
You might also have to un-tick Rarity of both animations.
 
Level 12
Joined
Nov 3, 2013
Messages
989
Open the model in the Warcraft Model Editor, remove its spell animation, if it has one,
then rename 'Attack 1' to 'Spell'
Remove '-2' from the attack animation name ( everything done in the Sequence editor).
You might also have to un-tick Rarity of both animations.

Yeah, afaik you have to do like Ardenian says here. You could technically play another animation through trigger but there would be a delay.

If you don't change the base animation played directly from the spell or ability the unit would first play the wrong animation for something like 0.3 seconds depending on it's casting point or w/e and then the triggered animation could be played instead only afterwards.
 

Ardenian

A

Ardenian

Why writing a seperate script/trigger when you import a custom model anyways,
not to mention how easy the model edit is compared to setting up and writing a script concept
 
Level 12
Joined
Nov 3, 2013
Messages
989
Why do modeling when you can easily enough do it by scripts? Saves a spell animation.

Can you do it with script without extra delay?

How do you prevent the unit from playing the normal spell animation, without breaking the spell or ability, and not have the unit wait the entire "unit - cast point" period before playing the scripted animation?

Why writing a seperate script/trigger when you import a custom model anyways,
not to mention how easy the model edit is compared to setting up and writing a script concept
Well, obviously we'd rather just put in one line of script, if it actually worked, but that doesn't work. (You can perhaps use things like "issued order" with no target abilities, since the unit will never have to move first to get in range to cast.)

So the better alternative is usually to just change the model a bit, like you said.
 
Status
Not open for further replies.
Top