Redunzgofasta's Trigger and Darvo's(darvlok) Tutorial :
This how you make a good Attack Trigger, that targets every unit of a certain player
First make a new trigger and name it, then make a new event that adds a periodic timer that activates every 20seconds in real time.
Next click on the Local Variables and press CTRL W.
Then at type, search for Unit Group
Then double click on Initial Value: Empty Unit Group. And search for the Units in Region With Alliance To Player
Now you only need to Change Any Player to Player 1, now name your first Variable, we used Zerg.
Now repeat Part 1 to Part 4 and change Any Player to your enemies Player number. And change the new Local Variable name to Player 1.
Now repeat Part 5 again if you have more enemies or a second Player ally.
Now you need to make a Action, press CTRL W again. And search for the add Unit group to Unit group.
Click on Source Unit Group and go to variable and add Player 2.
Then go to Target Unit Group and go to variable and add Player 1 so Player 1 and Player 2 are in one Unit Group and have both the same ally’s and enemies.
Now add the last action, and search for the Issue order to Unit Group
Now go to the Group section and add the Zerg Unit Group.
Now change the Order with no target to Order targeting Unit Group
Change Ability Command to Attack
Then change Unit Group to Player 1
Your finished and made a worldwide Attack Trigger, you can use this trigger in zombie maps and defense maps.
Is it really necessary to add local variables for each player? If you just create a local variable named 'Player Units' and set it equal to all units who are an enemy of Player 15 hostile, it should count for all units of every active player, should it not?
Redunzgofasta's Trigger and Darvo's(darvlok) Tutorial :
This how you make a good Attack Trigger, that targets every unit of a certain player
First make a new trigger and name it, then make a new event that adds a periodic timer that activates every 20seconds in real time.
Next click on the Local Variables and press CTRL W.
Then at type, search for Unit Group
Then double click on Initial Value: Empty Unit Group. And search for the Units in Region With Alliance To Player
Now you only need to Change Any Player to Player 1, now name your first Variable, we used Zerg.
Now repeat Part 1 to Part 4 and change Any Player to your enemies Player number. And change the new Local Variable name to Player 1.
Now repeat Part 5 again if you have more enemies or a second Player ally.
Now you need to make a Action, press CTRL W again. And search for the add Unit group to Unit group.
Click on Source Unit Group and go to variable and add Player 2.
Then go to Target Unit Group and go to variable and add Player 1 so Player 1 and Player 2 are in one Unit Group and have both the same ally’s and enemies.
Now add the last action, and search for the Issue order to Unit Group
Now go to the Group section and add the Zerg Unit Group.
Now change the Order with no target to Order targeting Unit Group
Change Ability Command to Attack
Then change Unit Group to Player 1
Your finished and made a worldwide Attack Trigger, you can use this trigger in zombie maps and defense maps.
any ideas on how to make it target a specific unit? like a group of em targeting a single zealot
Is it really necessary to add local variables for each player? If you just create a local variable named 'Player Units' and set it equal to all units who are an enemy of Player 15 hostile, it should count for all units of every active player, should it not?
instead of making it "order targeting a unit group" make it an "order targeting a unit"