• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Trigger not working!

Status
Not open for further replies.
Okay, im working on a campaign map and i have a little problem. The trigger below should set the hitpoints and armor to a number wich depends on the difficulty chosen. My problem is that it affacts the unit 'Keeper of Divinity', wich it shouldnt. All answers will be rewarded with reputation.

~x-omg-x

  • DiffilcultySet
    • Events
      • Dialog - A dialog button is clicked for Difficulty
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Easy
        • Then - Actions
          • Game - Display to (All players) for 5.00 seconds the text: |c0000FF00Difficult...
          • Unit Group - Pick every unit in (Units owned by Player 2 (Blue) matching ((Unit-type of (Picked unit)) Not equal to Keeper of Divinity)) and do (Actions)
            • Loop - Actions
              • Unit - Add Easy to (Picked unit)
              • Unit - Add EasyHp to (Picked unit)
              • Unit - Set life of (Picked unit) to 50.00%
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Normal
        • Then - Actions
          • Game - Display to (All players) for 5.00 seconds the text: |n|n|n|n|n|c00FFFF0...
          • Unit Group - Pick every unit in (Units owned by Player 2 (Blue) matching ((Unit-type of (Picked unit)) Not equal to Keeper of Divinity)) and do (Actions)
            • Loop - Actions
              • Unit - Set life of (Picked unit) to 80.00%
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Hard
        • Then - Actions
          • Game - Display to (All players) for 5.00 seconds the text: |n|n|n|n|n|c00FF000...
          • Unit Group - Pick every unit in (Units owned by Player 2 (Blue) matching ((Unit-type of (Picked unit)) Not equal to Keeper of Divinity)) and do (Actions)
            • Loop - Actions
              • Unit - Add Hard to (Picked unit)
              • Unit - Add HardHp to (Picked unit)
        • Else - Actions
 
Level 8
Joined
Aug 21, 2009
Messages
333
I got it.

  • Unit Group - Pick every unit in (Units owned by Player 2 (Blue) matching ((Unit-type of (Picked unit)) Not equal to Keeper of Divinity)) and do (Actions)
should be
  • Unit Group - Pick every unit in (Units owned by Player 2 (Blue) matching ((Unit-type of (Matching unit)) Not equal to Keeper of Divinity)) and do (Actions)
You need to change "Picked Unit" to "Matching Unit" for all 3 occurrences of this.

That should fix it :D
 
Status
Not open for further replies.
Top