| 12-13-2009, 07:41 AM | #1 |
Is there a trigger to get Unit damage? Say i have a footman doing 10-11 damage. I want to get the damage of the footman and apply it into a custom spell. Eg: Unit Damage x 2 + Strength. Thanks in advance! |
| 12-13-2009, 07:56 AM | #2 |
No. You could only get the damage returned using the specific unit event, "Unit takes damage." You could just store the damage range into some variable for every unit or something. Or attach it to the unit itself. etc etc. EDIT: I mean, of course, if your custom spell triggers off of a normal attack then you can definitely do that easily... But if it's just some spell you cast, then you'll need to store the damage range somewhere, somehow. |
| 12-13-2009, 08:14 AM | #3 |
| 12-13-2009, 08:37 PM | #4 |
http://www.wc3c.net/showthread.php?t=108314 or http://www.wc3c.net/showthread.php?t=108319 Chose what you prefer. |
| 12-14-2009, 07:36 AM | #5 |
or you recalculate it with GetEventDamage() and some scrips (dusk's armorutils and some other) |
| 12-14-2009, 09:26 AM | #6 |
That still doesn't factor in Damage and Armor types, so isn't very accurate. |
| 12-14-2009, 12:58 PM | #7 | |
Quote:
oops...but can be a problem --> make all damage and armor factors equal to 1.00 |
| 12-14-2009, 02:29 PM | #8 |
Or then you need to know that stuff, so you can calculate the original damage amount by taking those types and armor values and resistances in account. It would probably be easier to use that object daat thingy to get base damage and some bonus system to handel all the sources of bonus damage and keeping the track of it or sumthing. |
| 12-14-2009, 02:39 PM | #9 | |
Quote:
|
