So I'm making an ability for a hero with, for all intents and purposes, the Demon Hunter model file. (It's that unarmed hero model from the Hive Workshop.) For one of his triggered abilities, I have it give him an ability based on Channel and make him cast it. This is so he can't do anything else during the ability. I want it to make him play his second attack animation while he's channeling this. I can't make him play an animation with triggers while he's channeling for some reason. So I set the spell's animation to every variant of attack 2 I can think of, and none of them stop him from sometimes doing his attack 1 animation. So what's the correct syntax for specifying attack 2? Is there one?
A moment ago, I tried having it pause him instead of making him channel something, and make him play an animation, but I run into the same problem.
How do I make an ability use a specific attack animation?
-
- Noobite Warrior
- Posts: 16
- Joined: Sun Feb 28, 2010 1:05 am
Re: How do I make an ability use a specific attack animation?
I don't know of any method of directly referencing the first or second attack animation.
If you have a program capable of editing MDL files, you could simply copy the animation and rename it so that it is no longer an "attack."
This tool may be useful to you: http://www.hiveworkshop.com/forums/tool ... tor-62876/
If you have a program capable of editing MDL files, you could simply copy the animation and rename it so that it is no longer an "attack."
This tool may be useful to you: http://www.hiveworkshop.com/forums/tool ... tor-62876/
͎̟͕͎̯̺͎̟͕͎̯̺ĩ̵̢͉̺̹͖͔̻̣̟̙ͦ̋Ìͤ̈ÌÍ«Ì“ÍÍ̅͊͒ͪͬͧͅn̢̮͈̪̤̳ÌÍ¥ÌÌ̌͊͜͟Í
̵̢͉̺̹͖͔̻̣̟̙ͦ̋Ìͤ̈ÌÍ«Ì“ÍÍ̅͊͒ͪͬͧͅn̢̮͈̪̤̳ÌÍ¥ÌÌ̌͊͜͟Í
̵̢͉̺̹͖͔̻̣̟̙ͦ̋Ìͤ̈ÌÍ«Ì“ÍÍ̅͊͒ͪͬͧͅn̢̮͈̪̤̳ÌÍ¥ÌÌ̌͊͜͟Í
-
- Noobite Warrior
- Posts: 16
- Joined: Sun Feb 28, 2010 1:05 am
Re: How do I make an ability use a specific attack animation?
If there's a way to use Magos to do that, I haven't found it. But I'll keep trying. It's disappointing that you can't stipulate specific attack animations with spells or triggers.
Re: How do I make an ability use a specific attack animation?
You can play specific animations with:
You can play the different animations by changing the integer. To check which integer plays which animation you can use WC3Viewer for example, it shows all the animations in the right order (starting from 0).
Not sure about your custom model, but to play the attack 2 animation of the original demon hunter it would be 6.
Code: Select all
SetUnitAnimationByIndex(unit, integer)
Not sure about your custom model, but to play the attack 2 animation of the original demon hunter it would be 6.
Humans don't have the patience to wait even ten minutes for something!
-
- Noobite Warrior
- Posts: 16
- Joined: Sun Feb 28, 2010 1:05 am
Re: How do I make an ability use a specific attack animation?
So can I just slot that code into a run custom script action? (I'm a wussy GUI user.)
Edit: So I just tried it. I naively presumed I could just put in the name of a unit variable, and the editor barfed and disabled it when I tried to save. So, how do I put a unit variable in there?
Edit: So I just tried it. I naively presumed I could just put in the name of a unit variable, and the editor barfed and disabled it when I tried to save. So, how do I put a unit variable in there?
Re: How do I make an ability use a specific attack animation?
Yeah, custom script is fine. You have to put "udg_" in front of the variable. Let's say the variable is called Demon, then you'd have
Code: Select all
call SetUnitAnimationByIndex(udg_Demon, 6)
Humans don't have the patience to wait even ten minutes for something!
-
- Noobite Warrior
- Posts: 16
- Joined: Sun Feb 28, 2010 1:05 am
Re: How do I make an ability use a specific attack animation?
Thanks. It works!