• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

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
 
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.
 
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.
Back
Top