Originally Posted by mikethecoder4
Hmm this is intersting. What is sourceType exactly? thought it was the damage type.
However, wouldn't this code increase the counter every time I did damage?
|
No, damage type is damageType
sourceType is of
CombatUnitType, as is targetType.
You need to check sourceType and sourceName, because you can't prevent people naming themselves Scamp or Wolf.
However, wouldn't this code increase the counter every time I did damage?
|
You still need to filter out all action results you don't care about, too, of course. My snippet is just to verify that it is the player whose event you process.