• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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