HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Attack Detection Event

01-27-2008, 03:27 PM#1
chobibo
Good day to everyone!
First of all I wanted to ask what GetEventTargetUnit() does? Is it like for the spell target event? thanks for any answers!
Now for my main question: When using the Unit Event EVENT_UNIT_DAMAGED, can I detect who damaged the triggering unit? GetAttacker() is obviously for EVENT_UNIT_ATTACKED so I can't use it.
If there's no way to detect the attacker then can you please recommend any attack detect system. Thanks, I'll just be using it for a spell.
01-27-2008, 03:35 PM#2
Troll-Brain
1)
Quote:
Originally Posted by common.j
// EVENT_UNIT_ACQUIRED_TARGET
// EVENT_UNIT_TARGET_IN_RANGE
constant native GetEventTargetUnit takes nothing returns unit

2)
Collapse JASS:
constant native GetEventDamageSource takes nothing returns unit
But il will fire for any damage (buff,attack,ect)

There are few decents detect attack system on this forum, but not perfects, cause limitations of the jass
01-27-2008, 03:42 PM#3
chobibo
Thanks troll! I'm so stupid I wasn't able to find that one on TESH lol. Thanks again!