• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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: 15
  • wc3 omnilight 02 - ability.JPG
    wc3 omnilight 02 - ability.JPG
    115.5 KB · Views: 15

Wrda

Spell Reviewer
Level 25
Joined
Nov 18, 2012
Messages
1,873
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