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