HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

violent reaction, and questions for XEdamage

08-15-2008, 12:23 PM#1
waaaks
woah, really great module, its so flexible

just confused on where to put this?
Collapse JASS:
   if (xedamage.isInUse() ) then
       if(xedamage.CurrentDamageType == DAMAGE_TYPE_FIRE ) then
           call BJDebugMsg(R2S(GetEventDamage())+" fire damage was inflicted to "+GetUnitName(GetTriggerUnit() ) )
       endif
       call BJDebugMsg("tag used: "+I2S(xedamage.CurrentDamageTag) )
   endif
if this code must be placed on the actions, then what event will i use?

-can i detect attacks with this module?
-if a unit attacks, does it deal ATTACK_TYPE_MELEE, and DAMAGE_TYPE_NORMAL? if yes, then that means i can detect attacks with this
-whats the best event will i use to detect damage with this module?
-what will be the next module youll making?
08-15-2008, 01:18 PM#2
Vexorian
violent reaction?

I think I'll try either xeevents or xecollider . However both probably need me to make function pointers more user friendly.

Those are event responses for a EVENT_UNIT_DAMAGED event, xedamage does not do damage detection, but it provides event responses for that, also, the event responses only work if isInUse() is true, so they are not helpful for unit attacks.
08-16-2008, 01:57 AM#3
waaaks
oh, i got it, so that means those .CurrentDamageType may only be applied when isInUse() is used, thanks