• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[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
 
  • 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)
 
Status
Not open for further replies.
Back
Top