HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

getting damage?

12-07-2004, 06:35 AM#1
311
How do you get a units damage? I need it for a triggerd spell thats based off the units current damage? I thought there was a units current damage integer, but I cant seem to find it. So is the only way to get the units current damage is to have it set in a variable at start of game and have triggers that +when items or leveing?

in simple terms I want a trigger that does this
order unit to damage attackd unit for attacking units current damage x3
12-07-2004, 07:13 AM#2
BBDino
Hmmmm, i cant think of a way to do it easily, i spouse something sneaky could be done with critical strike and unit cloning but im not convinced you could get it seamless enough for use....
12-07-2004, 11:52 AM#3
AntJAB
The only simple way I see it done at this moment is with a fake spawned units.
Create 2 units equal to attacking unit with 1 second timer.
Order 3 units to attack.
Thus mimicking a damage x3.

If you really want to get into the nitty gritty you coudl think about spawning a dud unit with no self healing and exactly x health, spawn a copy of the attacking unit, order the copy to attack the dud, and do some math to find out how much health the dud lost.
12-07-2004, 12:23 PM#4
xGT4x
If it's a hero, you can easily use main attribute + check for items as claws + base damage, which (on Blizzard heroes) is the same for every "type" of heroes. If only one hero type can use it it should be no problem to use the base damage and main attribute, for the middle part i think u can easily use a loop to scan all slots for all attack damage items! Ahh and additionally you would've to check for abilities/buffs which give bonus damage!
12-07-2004, 01:49 PM#5
311
darn I make the coolest ability ever and now this has to happen. I coulda sworn there was a new trigger of units damage as an integer. I think I might just do base damage and skip items/buffs because thats way to much work.
12-07-2004, 04:37 PM#6
th15
"Unit - damage taken" is a specific unit event response. i.e. if you want to use it, you'd have to add every legal target of the ability as an extra event for the trigger. Not exactly feasible.