HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Doing damage in Takes damage event

04-22-2007, 07:17 PM#1
CommanderZ
Hello,
I' working in custom critical strike spell and I have following problem:
The trigger gets triggered by Unit Takes Damage event and I need to do bonus damage during this event using UnitDamageTarget. But this fires the trigger again (as it fits the conditions). Now I have set the chance to 100%, so every attack leads to brutal crash. Is there any simple way how to prevent this?
04-22-2007, 07:23 PM#2
wyrmlord
When the unit is damaged, set some value on the attacker to know that he's already attacked and not to damage the target again. So when the damage event fires off the second time from the triggered damage, you then not damage the target and reset the specific value to whatever it was before.
04-22-2007, 07:27 PM#3
CommanderZ
This is what I wanted to avoid. I was thinking about it again and again and found no other way :(
04-22-2007, 07:34 PM#4
Ammorth
You can disable the trigger, deal the damage and enable the trigger again. That should all work without a wait, still making any other detections work.
04-22-2007, 07:57 PM#5
CommanderZ
Nice idea, I will try it tomorrow