• 💀 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!

Need help...

Not open for further replies.
Level 21
Jul 2, 2009
I want a generator after you fix it to have the energy field ability (I will create it or something else can) so it can harm the undead.
When its damaged it can't use this ability. Can someone help me? :razz:
Level 22
Feb 4, 2005
You can do that like:

If by 'damaged' you mean not full life:

  • Field
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • If ((Life of (YourUNIT)) Greater than or equal to 500.00) then do (Unit - Remove YourABILITY from (YourUNIT)) else do (Do nothing)
      • If ((Life of (Triggering unit)) Less than 500.00) then do (Unit - Remove Acid Bomb from (Triggering unit)) else do (Do nothing)

I suppose you already know what your 'field' ability will be like and you just need your enable/disable system. This should work.

A more proper event would be if you have it on your map to use the event: Unit - Generator 0000 <gen>'s life becomes Less than 500.00 - Actions: remove ability from your unit.

A 2nd trigger with the same Event: if life becomes greater than 500 - Actions .. etc.

This makes it onces it becomes above that life to do something. With 'Every 0.1 sec you won't have more than 1 ability but in order to not add, this 2nd options is better.
Not open for further replies.