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

Player unit count?

Status
Not open for further replies.
Level 37
Joined
Mar 6, 2006
Messages
9,243
Something like this. What should happen if there is a tie?

  • Set i1 = 0
  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Set i = (Number of units in (Units owned by (Picked player) of type Footman))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • i Greater than i1
        • Then - Actions
          • Set i1 = i
          • Set PLAYER = (Picked player)
        • Else - Actions
 
Level 5
Joined
Jul 24, 2009
Messages
70
Ok I tried his trigger and it didn't not worked.

Edit: I finally made it work. Well I hope.

Edit 2: It didn't worked as the example above but I happened to make my own who is far more larger but with more infos for the process wc3 can make it work well. If you wish I can show an example of how it work.
 
Last edited:
Level 5
Joined
Jul 24, 2009
Messages
70
  • Event: A unit die
  • Condition: Unit type of Dying unit = Roman Emperor
  • Action:
  • Unit - Remvoe Triggering Unit
  • Set HRE = 1
  • Set HRE1 = Numbers of livings units of type City(Germany) owned by player 1 (red) + Numbers of lovings units of type City(Austria) owned by player 1(red).
  • If/then/else:
  • If: HRE1 is higher than HRE
  • Then:
  • Set HRE = HRE
  • Set HREemperor = Player 1(Red)
  • Else: If/then/else
  • If: HRE1 = HRE
  • Then: Set Dice a random number between 1 and 2
  • If/then/else:.... Well etc
 
You surely didn't change the unit type in Maker's trigger? Also try reducing the unit types of cities to one so it could be easily picked.

Or, add integers; when a player captures/builds/destroys a city, add/subtract one from the player's city counter. When emperor dies, check every player's counter using Maker's trigger.
 
Status
Not open for further replies.
Top