• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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