• 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.

Getting damage from DamageEngine

Status
Not open for further replies.
Level 19
Joined
Aug 8, 2007
Messages
2,765
Ok, i posted a while ago about damage-engine, how to get what type of damage it causes so my spells dont get stuff that normal attack should only get. The problem with is that i used this


(Current order of DamageEventSource) Equal to (Order(attack))

The problem is that i have spells that you cast and than you can do something else (say, a really long Chain Lightning. you can cast it, go to attack, than the damage engine will think the attacks made by chain lightning and will proc the effect) Is therea better way i can do this?
 
Level 11
Joined
Nov 15, 2007
Messages
800
Trigger all of your spell damage, he means. You can set the "type" of damage with the damage engine, and then check that the damage type isn't normal non-triggered damage. That way the only non-triggered damage will be basic attack damage.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Trigger all of your spell damage, he means. You can set the "type" of damage with the damage engine, and then check that the damage type isn't normal non-triggered damage. That way the only non-triggered damage will be basic attack damage.

How?

e/ the variable type "Damage Type" does not have any functions to get the damage type.. except ConvertDamageType(integer).. im not even sure that works and even if it does i cant find a condition for damagetype==magic
 
Last edited:
Level 11
Joined
Nov 15, 2007
Messages
800
Damage type is an integer. By default it uses 1 2 and 3 for ranged damage and two other types I can't remember. If you set the variable to a number higher than 3 before using a "Cause unit to damage target" action, you can then detect if the damage type integer was higher than 3 when damage was dealt. If it was, it wasn't triggered damage. So if all of your damage is triggered in this manner, you can detect normal attacks.
 
Status
Not open for further replies.
Top