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

how can i ...

Status
Not open for further replies.
Level 3
Joined
Sep 3, 2007
Messages
27
how can i make a trigger that checks if a player has a required building then to run the trigger for the income = to living units x ?
Something Like if player has tax collector's office start trigger income if building dies turn of trigger income for matching player something like this but i don't know exactly how :sad:
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Using Unit Group variable TempGroup

  • Tax Collector
    • Events
      • Time - Every n seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick Every Player in (All Players) and do actions
        • Loop - Actions
          • Set TempGroup = ((Units of Type Tax Collector) owned by (Picked Player))
          • If (All Conditions are True) Then do (Then Actions) Else do (Else Actions)
            • If - Conditions
              • (Number of (Units in TempGroup)) Greater than 0
            • Then - Actions
              • -------- Do tax collecting stuff --------
            • Else - Actions
          • Custom script: call DestroyGroup(udg_TempGroup)
 
Status
Not open for further replies.
Top