Warcraft III resources & community, 2003–2006 · archived

Question: how to track attack type

6 posts
#1

Question: how to track attack type

i made a trigger to show damage over head. but i want to go further.

i want to, when the unit is damaged by a spell, it shows the text in yellow, and when its not spell, shows in white, like wow.

i know how to change colors and stuff, its all ready.
but the problem is that i cant track the attack type..

how i do it? have seen that theres a variable type thats "attack type". but its useless since you cant track the attack type.. or you can? please help
#2
Hmm what about doing it so it check if the unit is under the effect of an spell or something, but dunno really, would need to look further into this which I am to lazy to do :)
#3
maybe you can use 2 different triggers, one for each color...

event: unit is attacked
if has buff('spelltarget')
-> do the red text
else
-> do the white one
event: unit casts spell
if singletarget
-> add buff('spelltarget') to targeted unit
else
-> pick every unit in AOE
(
if picked unit = legal target
(
-> add buff('spelltarget') to picked unit
))


i know this is very basic semi-code but i hope you understood what i ment...
#4
I don't find 'add buff' trigger :oops:
#5
the buff stuff might work but ill have to use a dummy unit and thats the last thing i wanna do cuz my damage system is multistanceable, many units at the same time can show damage. adding a dummy may break that out..

but thats an idea, i may test it out Lord Raszul, thanks alot.
#6
the buff stuff might work but ill have to use a dummy unit and thats the last thing I wanna do cuz my damage system is multistanceable, many units at the same time can show damage. adding a dummy may break that out..


WTF you on about there is no way a dummy unit will break a spells multincastability since as long as you destroy the unit or keep track of its handle it will never leak and you can refer to it when ever you wish.

Of course if your programing in GUI you might not be able to make it multincastable but jass + handle vars = easy.