• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Help me with this trigger plz

Status
Not open for further replies.
Variables
---------
Unitcount - Integer - Init=0

Trigger 1
---------
Events: unit enters region 001
condition: (define what unit should enter, should it be owned by player 1, should it only be a footman, or ...)
Action: Set variable: Unitcount = Unitcount + 1

Trigger 2
---------
Events: unit leaves region 001
condition: (define what unit should enter, should it be owned by player 1, should it only be a footman, or ...)
Action: Set variable: Unitcount = Unitcount - 1

Trigger 3
---------
Events: unit enters region 001
Condition: Integer: Unitcount >=5
Action: Pick every unit in (units in region [owned by player 1 if that was a condition in trigger 1 and 2]) and do action: kill picked unit
Unit - Create Thenewunit at center of region 001


If this should happen every time you have 5 units in your region, add the following action to the last trigger

Set variable: Unitcount = 0

If this should not happen every time, I'd suggest to add the following action to the 1st and 2nd rtiger:

Trigger : Turn off trigger 1 (and 2)
 
Status
Not open for further replies.
Back
Top