• 🏆 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] Check if unit has ability?

Status
Not open for further replies.
Level 9
Joined
Apr 14, 2007
Messages
437
I've looked but found nothing. Anyway, how do you make a trigger to check if a unit has an ability?
  • Player Has Chosen Turtle
    • Events
      • Player - Player 1 (Red) types a chat message containing -turtle as An exact match
      • Player - Player 2 (Blue) types a chat message containing -turtle as An exact match
      • Player - Player 3 (Teal) types a chat message containing -turtle as An exact match
      • Player - Player 4 (Purple) types a chat message containing -turtle as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -turtle as An exact match
      • Player - Player 7 (Green) types a chat message containing -turtle as An exact match
      • Player - Player 8 (Pink) types a chat message containing -turtle as An exact match
      • Player - Player 9 (Gray) types a chat message containing -turtle as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -turtle as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -turtle as An exact match
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering player) is an ally of Player 6 (Orange)) Equal to True
        • Then - Actions
          • Unit Group - Pick every unit in (Units owned by (Triggering player) of type Support Powers 1 (usa)) and do (Unit - Add |cFFC04000Support Power|r Structual Defense (Neutral Hostile) to (Picked unit))
          • Unit Group - Pick every unit in (Units owned by (Triggering player) of type Support Powers 2 (usa)) and do (Unit - Add |cFFC04000Support Power|r Raise De|cFFFFFF00f|renses to (Picked unit))
          • Unit - Create 1 Turtle Class for (Triggering player) at (Center of Tur Class <gen>) facing Default building facing degrees
        • Else - Actions
          • Unit Group - Pick every unit in (Units owned by (Triggering player) of type Support Powers 1 (china)\) and do (Unit - Add |cFFC04000Support Power|r Structual Defense (Neutral Hostile) to (Picked unit))
          • Unit Group - Pick every unit in (Units owned by (Triggering player) of type Support Powers 2 (china)\) and do (Unit - Add |cFFC04000Support Power|r Raise De|cFFFFFF00f|renses to (Picked unit))
          • Unit - Create 1 Turtle Class for (Triggering player) at (Center of Tur Class <gen>) facing Default building facing degrees
In that trigger, I want it to check if a player has a unit with a certain ability.
 
Status
Not open for further replies.
Top