• 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.

Dying Unit / Buff / Variable

Status
Not open for further replies.
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

I want create spell, that increase the speed for all nearby units, if a unit dies when the unit has the buff of my ability.

Problem is, I can't check the buff of a dying unit. So I think about, to get a variable for the target unit
  • Set Unit = Target unit of ability being casted
But now I got the problem, how can I remove this variable, if the unit hasn't the buff anymore?
 
You have to use a buff checking system, but you might get problems, since there i none I know of.

I could do one, but it would be an huge thing.

Just add all units to a unitgroup and periodicly check if the unit is dead,... If yes, you can call your bonus and remove the unit from the group.

When the spell duration ends, just remove it from the group.
 
Status
Not open for further replies.
Top