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

[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