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!
Alright, and do you have a model that has two distinct animation sets? For example normal (Attack) and alternate (Attack Alternate) or swim (Attack Swim)?
Or do you wish to distinct the ranged and melee attacks by animation index of 'attack' animations?
The most logical approach is probably to create Alternate Attack animations to resemble the melee-attacks. Then, when the unit is in close combat, you can add "Alternate" tag to his animations.
The most logical approach is probably to create Alternate Attack animations to resemble the melee-attacks. Then, when the unit is in close combat, you can add "Alternate" tag to his animations.
Sure. Attached is a test map with a Troll Headhunter that alternates between standard and alternate animations depending on whether he is targeting Peon or not.
Here's the trigger (also included in the test map).
Attack Animation Alteration
Events
Unit - A unit Is issued an order targeting an object
Conditions
(Unit-type of (Ordered unit)) Equal to Headhunter
(Issued order) Equal to (Order(attack))
Actions
Game - Display to (All players) the text: Trigger
Trigger - Turn off (This trigger)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Target unit of issued order)) Equal to Peon
Then - Actions
Animation - Add the alternate animation tag to (Ordered unit)
Wait until ((Current order of (Ordered unit)) Not equal to (Order(attack))), checking every 0.10 seconds
Animation - Remove the alternate animation tag to (Ordered unit)
Else - Actions
Animation - Remove the alternate animation tag to (Ordered unit)
Trigger - Turn on (This trigger)
Edit:
Also note that this is scrambled in just a few minutes so it is not the polished or fine-tuned example, but shows the logic that you can use. Using the animation tag adding and removing it when the conditions are no longer met (I just simply used a conditional wait).
The meaning of this native is better explained in the graphical interpretation triggers, where it is is called Add Animation Tag.
In Warcraft 3 unit actions are associated with animations and sometimes with additional tags to differentiate two similar animations. Good example is the Human Scout Tower. When you build a Scout Tower you'll get a Scout Tower that is constantly playing its "stand" animation. When you upgrade the tower into a Guard Tower the model of the tower does not actually change but the Guard Tower instead plays the animation "Stand Upgrade First", where the "Upgade" and "First" are additional animation tags to imply that the stand animation it should play is the First Updated one.
Other examples of animation tags include wording such as "swim" - most Naga units have all animations in without the "Swim" tag, and those animations they play while on ground, while the game automatically tries to use any animation with the addition of the tag "Swim" whenever a unit enters deep water.
Attaches an animation tag to a unit until the said tag is removed. The true value adds it, the false value removes it. animProperties dictate which tag you wish to add ("Swim", "Alternate", "Upgrade", "First", "Gold", "Lumber"... the list goes on).
While the unit has said animation tag attached, it tries to play all animations with that said animation tag included. For example, if you would add "Swim" animation to a Naga Myrmidon, it will play the swim animation, even if it is on land. However, not all models have all animations covered by animation tags, meaning that if you for example add "Swim" tag to a Peasant, it will do nothing, as Peasant doesn't have animations for "Swim" tag. Thus, if a unit does not have animations associated with a tag, it will simply play the regular animation (without the tag) for said animations.
But how it understands that this is the attack animation that will be switched to alternate and not other animation?
I dont see AddUnitAnimationProperties specifying which one we change
It doesn't. Like I said earlier, the game will display the normal animation if there is no defined alternative. Meaning, you can use a model with only the attack animation having the specified tag (let's say "alternate"), so then the unit only uses the tag upon attack animations, as it doesn't have any other animation with the tag "alternate".
It will play whichever animation the game tells it - as usual. The only difference is that the animation will include the tag "alternate" if it has one. The game has its internal logic on which animations to play when: The game plays the Death animation when a unit dies, it plays the "Walk" animation when a unit is ordered to move, and so forth.
It changes all animations, but if your model only has the alternate -tag for attack animations, it will only affect attack animations. Note that in the example I provided I also remove the tag whenever the unit is not attacking a Peon, so you can also make a custom logic for it and remove/add the tag whenever you want.
I am sorry, what do you mean exactly?
Ancients are buildings when they are rooted, but if uprooted they become mobile and do not have a pathing layout - just collision, like units.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.