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

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

Status
Not open for further replies.

Deleted member 238881

D

Deleted member 238881

How to use spell animation to attack air units ONLY?
 

Uncle

Warcraft Moderator
Level 70
Joined
Aug 10, 2018
Messages
7,401
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.
 

Deleted member 238881

D

Deleted member 238881

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?
 

Uncle

Warcraft Moderator
Level 70
Joined
Aug 10, 2018
Messages
7,401
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.
 

Deleted member 238881

D

Deleted member 238881

A unit is attacked -> Attacked unit is Flying -> Add animation tag to attacking unit
ELSE
Remove animation tag from attacking unit
Unfortunately there is nothing about flying units in Trigger Editor.
 

Deleted member 238881

D

Deleted member 238881

I don't know how could I miss that. XD
 

Deleted member 238881

D

Deleted member 238881

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 70
Joined
Aug 10, 2018
Messages
7,401
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
 

Deleted member 238881

D

Deleted member 238881

That's not exactly what I was suggesting to do (...)
I'm sure you speak of animation tags you mentioned earlier. Well I tried it but then Rifleman is just standing while attacking flying unit (which is still taking damage).
 
Last edited by a moderator:

Deleted member 238881

D

Deleted member 238881

I'm pretty sure you just have to rename the animation. The neutral Hero Alchemist has an animation ("Spell Attack Two", if I recall correctly) that's used for spells and for his ranged anti-air attacks ("Combat - Attack 2" in Object Editor), but not for his melee attacks.
I already renamed animation. Still no sound.
 

Deleted member 238881

D

Deleted member 238881

Rifleman attack sound is played by the "KRIF" Sound Event; you have to add another event track (~146400) if you want it to also be heard during the Spell animation.
I don't exactly know what you mean.
 
Status
Not open for further replies.
Top