• 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] Checking the number of units in a bunker

Status
Not open for further replies.
Level 9
Joined
Jun 22, 2012
Messages
472
Hey there!

I need help at a step of one of my triggers. I need to check the number of units in a bunker (a kind of orc "farm", I don't have the name in English) but I don't know how to do so... It's maybe quite simple but I don't find the solution alone...

Thanks in advance, I hope I'm clear enough!
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
  • Set c = 0
  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units owned by (Picked player)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Conditions
              • ((Picked unit) is loaded into <transporter>) Gleich True
            • 'THEN'-Actions
              • Set c = (c + 1)
            • 'ELSE'-Actions
  • Game - Display to (All players) the text: (String(c))
 
Status
Not open for further replies.
Top