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

No flying units in region

Status
Not open for further replies.
Level 6
Joined
Apr 15, 2012
Messages
205
How do I make a trigger that triggers when there are no flying units in a certain region?

I have tried this trigger:

  • Viking Transform
    • Events
      • Unit - Any Unit dies
    • Local Variables
      • Viking Group = (Empty unit group) <Unit Group>
      • Total Units = (Empty unit group) <Unit Group>
    • Conditions
    • Actions
      • Variable - Set Viking Group = (Viking (Fighter Mode) units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount)
      • Variable - Set Total Units = (Any units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount)
      • Unit Group - Remove all units in Viking Group from Total Units
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • Total Units == (Any units in (Entire map) owned by player Any Player matching Required: Ground; Excluded: Missile, Dead, Hidden, with at most Any Amount)
        • Then
          • Unit - Order all units in Viking Group to (Viking - Assault Mode) (Replace Existing Orders)
        • Else
          • UI - Display "dddddddddd" for (All players) to Subtitle area
It's not working. I have tried to use it and it always does the "Else" action.
 
Last edited:
Level 6
Joined
Apr 15, 2012
Messages
205
It's a rectangular region, is there no other way to do it? with validators maybe?

When I
  • Unit Group - Remove all units in Viking Group from Total Units
Does it put a new value in the 'Total Units' variable or does it even change?
 
Level 6
Joined
Apr 15, 2012
Messages
205
  • Vikings
    • Events
      • Unit - Any Unit dies
    • Local Variables
      • Vikings = (Empty unit group) <Unit Group>
      • Air Units = (Empty unit group) <Unit Group>
    • Conditions
    • Actions
      • Variable - Set Vikings = (Viking (Fighter Mode) units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount)
      • Variable - Set Air Units = (Any units in (Entire map) owned by player Any Player matching Required: Air; Excluded: Missile, Dead, Hidden, with at most Any Amount)
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • (Number of Living units in Vikings) == (Number of Living units in Air Units)
        • Then
          • UI - Display "IT WORKS" for (All players) to Subtitle area
        • Else
          • UI - Display ":(((" for (All players) to Subtitle area
          • UI - Display (Text((Number of Living units in Vikings))) for (All players) to Subtitle area
          • UI - Display (Text((Number of Living units in Air Units))) for (All players) to Subtitle area
it works!
 
Status
Not open for further replies.
Top