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

[Solved] Rooted Ancient Abilities

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,877
Since these buildings will always be rooted by default, simply add the Life Regeneration ability to them in the Object Editor and then use this trigger:
  • Life Regen Ancient
    • Events
      • Unit - A unit Is issued an order with no target
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • ((Triggering unit) is An Ancient) Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • (Issued order) Equal to (Order(unroot))
          • (Issued order) Equal to (Order(root))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Life Regeneration (Tree) for (Triggering unit)) Equal to 0
        • Then - Actions
          • Unit - Add Life Regeneration (Tree) to (Triggering unit)
        • Else - Actions
          • Unit - Remove Life Regeneration (Tree) from (Triggering unit)
Alternatively, you could add/remove the ability based on the issued order instead of checking ability level (untested):
  • Life Regen Ancient
    • Events
      • Unit - A unit Is issued an order with no target
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • ((Triggering unit) is An Ancient) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(root))
        • Then - Actions
          • Unit - Add Life Regeneration (Tree) to (Triggering unit)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Issued order) Equal to (Order(unroot))
            • Then - Actions
              • Unit - Remove Life Regeneration (Tree) from (Triggering unit)
            • Else - Actions
 
Last edited:
Level 7
Joined
Sep 4, 2016
Messages
116
Can't you just disable/enable the ability instead of removing it? Or does that not work for fully passive abilities?
I would presume you are correct, otherwise the use of the disabled spellbook to hide passive abilities would not be a thing.
But, doesn't disable/enable affect all units on the team that have that ability? I think removing it is so that it can apply to individual units.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,877
I would presume you are correct, otherwise the use of the disabled spellbook to hide passive abilities would not be a thing.
But, doesn't disable/enable affect all units on the team that have that ability? I think removing it is so that it can apply to individual units.
I'm sure you can disable it just fine:
  • Unit - For (Triggering unit), Ability Animate Dead, Disable ability: True, Hide UI: True
Doesn't really make much of a difference though.
 
Status
Not open for further replies.
Top