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

[General] Changing the spell animation to the attack animation.

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,522
How to use spell animation to attack air units ONLY?
Haven't tested it but you could probably do something like this:
A unit is attacked -> Attacked unit is Flying -> Add animation tag to attacking unit
ELSE
Remove animation tag from attacking unit

The animation tag would toggle the unit's attack animation between the ground/air variants. You'd obviously have to edit the model to use an animation tag to get this to work.

I'm not sure if it works because the animation tag could kick in too late.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,522
How about self made animation tags? Will game recognize it? For example if I change animation name from Spell to Air Attack or Attack Air, will it work?
Purgeandfire goes into detail about animations here: Questions about naming animations

I assume all you have to do is use a unique name for your alternate attack animation. So in the Model Editor you would name the animation "Attack Air". Then when you add the "Air" tag to the unit (by using the method in that trigger I posted) it will no longer play it's standard "Attack" animation and instead play the "Attack Air" animation.
 
Level 9
Joined
Jun 25, 2014
Messages
199
IT WORKS!! THANK YOU!! :D Still have to edit model cause there is no sound & projectile but it's just minor formality. :)
Anim trigger.jpg
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,522
That's not exactly what I was suggesting to do but if it works then good.

Anyway, some issues with your trigger.
1) You're running the same Conditions twice.
2) You're using Do Nothing which is a rather useless function.

You can simplify it to this:
  • Animation
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Rifleman
      • ((Attacked unit) is A flying unit) Equal to True
    • Actions
      • Animation - Play (Attacking unit)'s spell animation
 
Status
Not open for further replies.
Top