• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

trigger help plz

Status
Not open for further replies.
Essentially, something like this:
  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units in Region 000 <gen>) and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Owner of (Picked unit)) Equal to Player 1 (Red)
          • Then - Actions
            • Set unitsOfPlayer1 = (unitsOfPlayer1 + 1)
          • Else - Actions
Just modify the condition and the variable part, and it will count the units of that player group in that region.
 
Essentially, something like this:
  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units in Region 000 <gen>) and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Owner of (Picked unit)) Equal to Player 1 (Red)
          • Then - Actions
            • Set unitsOfPlayer1 = (unitsOfPlayer1 + 1)
          • Else - Actions
Just modify the condition and the variable part, and it will count the units of that player group in that region.

is there way to use that above trigger as something like trigger below where action has to check the condition that checks amount of units controlled by player in a specific region and not the entire map?

  • Player Group - Pick every player in human_team and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Count non-structure units controlled by (Picked player) (Exclude incomplete units)) Equal to 0
        • Then - Actions
 
You will need:
  • Player Group - Pick every player in human_team and do (Actions)
    • Loop - Actions
      • Set Temp_Group = (Units in (Your region) matching (((Owner of (Matching unit)) Equal to (Picked player)) and (((Matching unit) is alive) Equal to True))
      • Game - Display to (Player Group (Picked player)) the text: "(String(Number of units in (Temp_Group)))"
      • Custom script: call DestroyGroup (udg_Temp_Group)
 
Status
Not open for further replies.
Back
Top