Untitled Trigger 004
Events
Player - Player 1 (Red) types a chat message containing -eliminate as An exact match
Conditions
Actions
Unit Group - Pick every unit in (Units in Region 000 <gen>) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Picked unit)) Equal to Pig
Then - Actions
Unit - Kill (Picked unit)
Else - Actions
Or you can do it with one like pick every unit in region matching... or whatever.Code:Untitled Trigger 004 Events Player - Player 1 (Red) types a chat message containing -eliminate as An exact match Conditions Actions Unit Group - Pick every unit in (Units in Region 000 <gen>) and do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Unit-type of (Picked unit)) Equal to Pig Then - Actions Unit - Kill (Picked unit) Else - Actions
Then - Actions
Unit - Explode (Picked unit)
I must have it beacus my map starts to lagg when pigs come's to town.
>>Kill only pl1 pigs or all
All pigs.
But only player1 red can write it.
Add more events, one for each player...
Exploding Pigs
Events
Player - Player 1 (Red) types a chat message containing -eliminate as An exact match
Player - Player 2 (Blue) types a chat message containing -eliminate as An exact match
Player - Player 3 (Teal) types a chat message containing -eliminate as An exact match
Player - Player 4 (Purple) types a chat message containing -eliminate as An exact match
Conditions
Actions
Set Temp_Group = (Units in [B](Playable map area)[/B] matching (((Unit-type of (Matching unit)) Equal to [B]Footman[/B]) and ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to (Triggering player)))))
Unit Group - Pick every unit in Temp_Group and do (Actions)
Loop - Actions
Unit - Explode (Picked unit)
Custom script: call DestroyGroup (udg_Temp_Group)
Somehow i cant make that first Action trigger.Code:Exploding Pigs Events Player - Player 1 (Red) types a chat message containing -eliminate as An exact match Player - Player 2 (Blue) types a chat message containing -eliminate as An exact match Player - Player 3 (Teal) types a chat message containing -eliminate as An exact match Player - Player 4 (Purple) types a chat message containing -eliminate as An exact match Conditions Actions Set Temp_Group = (Units in [B](Playable map area)[/B] matching (((Unit-type of (Matching unit)) Equal to [B]Footman[/B]) and ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to (Triggering player))))) Unit Group - Pick every unit in Temp_Group and do (Actions) Loop - Actions Unit - Explode (Picked unit) Custom script: call DestroyGroup (udg_Temp_Group)
Bolded parts are what you need to change.
It's a Unit Group Variable, and I'm using the "Set Variable" function.