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

Attack 2 Animation

Status
Not open for further replies.

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
Is possible to when casting a spell the hero plays his attack 2 ? I tried to set "Animation Name - attack,2" or "Animation Name - Attack 2" but it doesn't work.

The unit I want to play this animation is Demon Hunter. (not in demon form, only demon hunter)
 
Level 12
Joined
Nov 3, 2013
Messages
989

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
Level 12
Joined
Nov 3, 2013
Messages
989
I tried to search in this site too, but I can't read nothing. Can someone plz tell me how can I do this?

Directly copy pasted the related info to the OP from the link provided by Greenix

How do I make play a specific animation when a unit casts an ability
Many people seem to have this problem, and I have also had it. The problem is the Object Editor doesn’t allow you to play definite animations (it doesn’t support the SetUnitAnimationByIndex function) so it means you would have to trigger the ability. That however isn’t the main problem which is that when a unit is given 2 commands to play an animation at the exact same time, only the first animation called is played. Object Editor functions are always called before the corresponding Trigger Action, so using the following trigger will not work as it will only play the animation specified in the Object Editor

What you would need to do is add in a Wait function of 0.01 seconds. This is virtually undistinguishable to the human eye however it allows you to play the animation. For further accuracy you would also want to increase the Duration of the base ability by 0.01. It would also be a good idea to set the Art – Animation Names to “stand” so you do not see a sudden twitch in the animation
 

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
This link http://www.hiveworkshop.com/forums/...eady-alternate-animation-via-triggers-210876/ looks like work. But I don't know how to use custom script.
  • Custom script: call SetUnitAnimationByIndex (your_unit, AnimationIndex)
How can I write the Demon Hunter as "your_unit" and what's the number of Attack 2 in "animation_index" ?
What you would need to do is add in a Wait function of 0.01 seconds. This is virtually undistinguishable to the human eye however it allows you to play the animation. For further accuracy you would also want to increase the Duration of the base ability by 0.01. It would also be a good idea to set the Art – Animation Names to “stand” so you do not see a sudden twitch in the animation

Can you trigger how would it look like ? The object editor should be "Stand" animation, right ?
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
Tutorial - "What you would need to do is add in a Wait function of 0.01 seconds."

I thought the min wait time was 0.3 or something?

Unless I'm wrong I guess you should do the same thing but use periodic event or a timer?

The point of waiting 0.01 is, you just want to wait a small amount of time.Doesn't matter whether it is 0.0 wait, 0.01 wait, 0.01 timer, etc.
 
Status
Not open for further replies.
Top