• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Codition Help!

Status
Not open for further replies.
Level 11
Joined
Jul 20, 2004
Messages
2,760
Yes there is but it will be risky. First of all, you have to know that dead units don't have buffs. Conclusion, you can't search for buffs once they are dead, only when they are attacked. Check everytime an unit is attacked, and it has your buff. Wait 1 second, check if the unit is dead and then do whatever you want to do. This is a bit risky because the buff might remove in that 1 second. But its the only method I could think of right now. If you don't use JASS atleast.

~Daelin
 
Level 6
Joined
Feb 4, 2005
Messages
302
Use the event unit is attacked, then wait 1 second.

I have an idea that can supplement the idea Daelin is using right now, but it'd take a variable and 2 triggers.

First, after casting the buff, run a timer. Make sure the timer is 1(or slightly more) second less than the duration of the buff.

Once the timer runs out, disable the trigger Daelin suggested. Then, you can't run out of time and still use the buff ;P
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Well, that's the whole point. You can do it like this:

Have a trigger which activates when the target is affected by the spell, and of course, deactivate it when the buff disappears. Now, the trigger's event is "An Unit Dies" and "Dying Unit" is equal to Target (variable which stores the "Target Unit of Ability Being Cast"). That's Telefragged idea in a nicer way and of course, it would be fully implementable in JASS. Why don't you try my JASS tutorial?

~Daelin
 
Level 6
Joined
Dec 13, 2004
Messages
320
Look out you could get caught for flaming yourself! Seriously though, depending on what you want it to do you could use doom, unit spawns a unit, spawned unit equal to <a dummy unit>, then do actions. Easy. Just remember to remove the dummy unit! JASS is not the only way. :wink:
 
Status
Not open for further replies.
Top