• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Player unit count?

Status
Not open for further replies.
Level 37
Joined
Mar 6, 2006
Messages
9,240
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