• 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] Defend Adds Armor

Status
Not open for further replies.
Level 7
Joined
Feb 20, 2016
Messages
274
I made a trigger for the Defend ability (used by footmen) to add armor when its activated, but its not working :(

footman defend.jpg
 

Attachments

  • wc3 omnilight 03 - file.JPG
    wc3 omnilight 03 - file.JPG
    15.7 KB · Views: 17
  • wc3 omnilight 02 - ability.JPG
    wc3 omnilight 02 - ability.JPG
    115.5 KB · Views: 17

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
2,010
Because it is an ability that can be turned on and off.
  • Defend
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(defend))
        • Then - Actions
          • Unit - Set Armor of (Triggering unit) to ((Armor of (Triggering unit)) + 10.00)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Issued order) Equal to (Order(undefend))
            • Then - Actions
              • Unit - Set Armor of (Triggering unit) to ((Armor of (Triggering unit)) - 10.00)
            • Else - Actions
 
Level 7
Joined
Feb 20, 2016
Messages
274
Because it is an ability that can be turned on and off.
  • Defend
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(defend))
        • Then - Actions
          • Unit - Set Armor of (Triggering unit) to ((Armor of (Triggering unit)) + 10.00)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Issued order) Equal to (Order(undefend))
            • Then - Actions
              • Unit - Set Armor of (Triggering unit) to ((Armor of (Triggering unit)) - 10.00)
            • Else - Actions
Hi thanks for the code but i dont understand how you added + 10 and -10 here:
((Armor of (Triggering unit)) + 10.00)
i can only select Armor of Triggering unit or the Value 10

set armor.JPG
 
Last edited:
Status
Not open for further replies.
Top