• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Question: how to track attack type

Status
Not open for further replies.
Level 4
Joined
Nov 22, 2004
Messages
62
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
 
Level 6
Joined
Feb 18, 2005
Messages
263
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...
 
Level 4
Joined
Nov 22, 2004
Messages
62
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.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
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.
 
Status
Not open for further replies.
Top