• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Detecting damage type

Status
Not open for further replies.
Level 8
Joined
Nov 9, 2008
Messages
502
Hi,
I'm designing an ability that when unit takes damage while ability 'block' is active he will counter attack with a stunning strike.

The problem I'm having is I have laid out damage detection but if the unit is damaged by a persistent source like poison he will continuously counter attack. Also it's my intention to counter only melee attacks so say of the damage type normal.

I can't find in any conditions a way to determine the damage type of damage source. I could do a unit type check on the source but that wouldn't solve the problem of a poisoning attack from a melee unit. I want him to simply counter the melee attack, not the poison effect or other spell based attacks.

Any suggestions?

EDIT:
I use a dummy to cast edited entangling roots on order issue 'defendon' to prevent blocking unit from attacking or moving.
When unit takes damage I play attack animation and order dummy unit to cast edited storm bolt to stun and damage attacker.
 
Status
Not open for further replies.
Top