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

What Damaged Unit

Status
Not open for further replies.
Level 19
Joined
Aug 8, 2007
Messages
2,765
How do i get this? how do i get wether a spell, smart command, trigger, etc. (or damage type) dealt the damage
 
If you're already using it Bribe's GUI system, then you wouldn't have to implement those.

DamageEventType == 0 -> Attack-damage
DamageEventType == 1 -> Spell-damage (Trigger-damage)

But, you're going to have paste this code somewhere:

JASS:
function DamageEngine_HookSpell takes unit source, widget target, real amount, boolean b1, boolean b2, attacktype at, damagetype dt, weapontype wt returns nothing
    set udg_DamageEventType = udg_DamageTypeSpell
endfunction

function DamageEngine_HookSpellBJ takes unit c, unit t, real amt, attacktype attype, damagetype dmgtype returns nothing
    set udg_DamageEventType = udg_DamageTypeSpell
endfunction

hook UnitDamageTarget DamageEngine_HookSpell
hook UnitDamageTargetBJ DamageEngine_HookSpellBJ
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
If you're already using it Bribe's GUI system, then you wouldn't have to implement those.

DamageEventType == 0 -> Attack-damage
DamageEventType == 1 -> Spell-damage (Trigger-damage)

But, you're going to have paste this code somewhere:

JASS:
function DamageEngine_HookSpell takes unit source, widget target, real amount, boolean b1, boolean b2, attacktype at, damagetype dt, weapontype wt returns nothing
    set udg_DamageEventType = udg_DamageTypeSpell
endfunction

function DamageEngine_HookSpellBJ takes unit c, unit t, real amt, attacktype attype, damagetype dmgtype returns nothing
    set udg_DamageEventType = udg_DamageTypeSpell
endfunction

hook UnitDamageTarget DamageEngine_HookSpell
hook UnitDamageTargetBJ DamageEngine_HookSpellBJ

that code is exactly what ive been looking for! thank you alot

e/ unable to give u rep
 
Status
Not open for further replies.
Top