• 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.

Need help...

Status
Not open for further replies.
Level 21
Joined
Jul 2, 2009
Messages
2,951
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
Joined
Feb 4, 2005
Messages
3,971
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.
 
Status
Not open for further replies.
Top