• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Any way to make unit take extra damage if facing away from attacking unit?

Status
Not open for further replies.
Level 8
Joined
Jul 17, 2004
Messages
283
Is there any way to make a unit take extra damage if he is facing away from the attacking unit?

For example,

>> Unit attacks unit
>> If attacked unit facing away from attacking unit, take extra damage, otherwise take normal damage
 
Level 11
Joined
Jun 2, 2004
Messages
849
Consistently? Use a damage detection system. "Unit is attacked" happens when the unit winds up a swing, not when the hit lands. "Unit is damaged" can't distinguish auto attacks from spells or any other type of damage. You'd need a damage detection system to have a unit is damaged event that only fires for auto attacks, then you can easily check position and facing.
 
Level 8
Joined
Jul 17, 2004
Messages
283
I just need it to detect normal attacks with the attack command (or if a unit auto attacks due to aggro), and then from there check to see if the attacked unit is facing away or toward the attacking unit. What DDS do you suggest?
 
Status
Not open for further replies.
Top