HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Calculating how much damage a unit HAS done (In Game)

08-05-2003, 03:18 PM#1
FyreDaug
I saw this before, a while ago, I think it was run by triggers. I need to store a variables for how much damage Unit X has just done to Unit Y. Anyone have any ideas how it was done, or where the map is?
08-05-2003, 03:32 PM#2
cideh
Event: A unit is attacked
Condition(Optional): Attacking unit equal to (Unit Y)
Action: Set Real_Variable = Unit - Damage taken
08-05-2003, 03:46 PM#3
DaKaN
yea Fyre, i just answered a question dealing with knowing how much dmg a unit is taking (or dealing). Look under Reals when setting or referencing variables. There is a Unit - Damage Taken. use that with a event that fires when a unit will take damage to keep a running tally.
08-05-2003, 03:59 PM#4
FyreDaug
Hmm, either I'm blind or I'm stupid, but I don't see Unit - Damage Taken in here. Even through the sub functions.
08-05-2003, 04:08 PM#5
MarSara
it's Event Response - Damage Taken, also it has to be used with A unit takes damage event, otherwise it will just be 0.
08-05-2003, 04:09 PM#6
FyreDaug
Thanks MarSara, I'm blind! ..... I blame Dakan :D

EDIT: Hmm, will this works with spells? Like blizzard? Not just a single hit spell?
08-05-2003, 04:19 PM#7
MarSara
I believe it would, but I've never tested it with spell damage.
08-05-2003, 04:25 PM#8
DaKaN
hey now! im going off of memory im at work :P
08-05-2003, 04:38 PM#9
FyreDaug
Well then what are you doing on the forums then? Get back to work you lazy overpaid/underworked ass. :D

Anyways, I don't think it would work well with spells, even with Darky's code, because it would be doing alot of attacking at once.