• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

[Trigger] An ability that kills a unit if it's health is below a certain percentage.

Not open for further replies.



Level 1
Feb 17, 2008
I've just started playing with world editor yesterday so I apologize if I'm missing something obvious.

The thing is, I want to make the spell described in the title, but I can't find a way to check for how much life a unit has. I can use Unit - Property in a Unit - Set life block, but I need it in an if/then block since I only want to change the life of the unit if the condition is met. It simply isn't there. I can't even set a variable to the unit's life, it isn't there for selection either in the Set Variable block.

if (life of (target unit of ability being cast)) < .....
Set UNITLIFE = Life of (target unit of ability being cast)

Is it possible that you can't do this in the trigger editor?

I have a workaround that doesn't check anything, but every time the ability is cast sets the life of the target unit to life*sgn(life - 0.3*maxlife), so if the unit is below 30% it sets it to negative life and otherwise to the same amount. This seems to work but this is not the way it should be done, it's a very bad way to do things.

I can't believe there is no way to CHECK for conditions like this... Can someone help?

edit: sorry for the "it's" in the title, seems I can't change it :)
Not open for further replies.