Two actions only =/
GUI:
Code:
Set integer = (Number of units in (Units in No rect((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True))))
If (integer Greater than or equal to 50) then do (Unit Group - Pick every unit in (Units in (Entire map)((((Triggering unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True))) and do (Unit - Change ownership of (Picked unit) to Neutral Hostile and Change c else do (Do nothing)
Jass:
Code:
function Trig_xantan_Func001002001002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_xantan_Func001002001002002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(0)) == true )
endfunction
function Trig_xantan_Func001002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_xantan_Func001002001002001(), Trig_xantan_Func001002001002002() )
endfunction
function Trig_xantan_Func002001 takes nothing returns boolean
return ( udg_integer >= 50 )
endfunction
function Trig_xantan_Func002002001002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetTriggerUnit()) == true )
endfunction
function Trig_xantan_Func002002001002002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(0)) == true )
endfunction
function Trig_xantan_Func002002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_xantan_Func002002001002001(), Trig_xantan_Func002002001002002() )
endfunction
function Trig_xantan_Func002002002 takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE), true )
endfunction
function Trig_xantan_Actions takes nothing returns nothing
set udg_integer = CountUnitsInGroup(GetUnitsInRectMatching(null, Condition(function Trig_xantan_Func001002001002)))
if ( Trig_xantan_Func002001() ) then
call ForGroupBJ( GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_xantan_Func002002001002)), function Trig_xantan_Func002002002 )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_xantan takes nothing returns nothing
set gg_trg_xantan = CreateTrigger( )
call TriggerAddAction( gg_trg_xantan, function Trig_xantan_Actions )
endfunction
you'll of course want to change no rect to the rect, and enemy of player should work fine, alive is good, all boalean (and) etc... you can do that yaya? =p
integer = a integer variable of course. rest I think you can know -- ie the trigger name was xantan.
oh, I just did the creep shit which he already did
Edit:
His variables are just arrays... name it that + array it should be an integer.