• 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] max unit trigger.

Status
Not open for further replies.
Level 9
Joined
Jun 7, 2008
Messages
440
I need a trigger that has it so when a certain capacity is reached, it kills a random unit owned by the maxed player... but the trigger cannot target heros. and i dont want to add a food capacity to the units. Any ideas? The trigger can also be in jass. I can further my skills there too. Its personal preference on this one if it is able to do that.
Light side - max limit 100
Dark side - max limit 150
 
Level 6
Joined
Mar 15, 2005
Messages
112
  • Untitled Trigger 001
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • (Number of units in (Units owned by Player 1 (Red))) Greater than or equal to (>=) 30
    • Actions
      • Unit - Kill (Random unit from (Units owned by Player 1 (Red) matching (((Matching unit) is A Hero) Equal to (==) False)))
This might work. Although I'd suggest limiting the thing that is actually creating the units. Example

  • Untitled Trigger 001
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • (Number of units in (Units owned by Player 1 (Red))) Less than (<) 30
    • Actions
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing (270.0) degrees
or if your building units normally

  • Untitled Trigger 001
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Number of units in (Units owned by Player 1 (Red))) Greater than or equal to (>=) 30
    • Actions
      • Unit - Kill (Trained unit)
 
Level 9
Joined
Jun 7, 2008
Messages
440
Thanks ALOT! That helps. :)

If i wanted all players to do this, Would it work if i put all players into :
if/then/else category? So i can make it all one trigger?
 
Status
Not open for further replies.
Top