I think it's a little more complicated than that. I'm getting weird results through the testing of these triggers:
QUOTE
Trigger("Player 1"){
Conditions:
Always();
Actions:
Create Unit("Player 1", "Terran Marine", 10, "Anywhere");
Set Switch("Switch0", set);
Display Text Message(Always Display, "first");
}
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Command("Current Player", "Terran Marine", Exactly, 10);
Switch("Switch0", set);
Actions:
Display Text Message(Always Display, "command 10");
}
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Always();
Actions:
Remove Unit At Location("Current Player", "Terran Marine", All, "Anywhere");
}
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Always();
Actions:
Create Unit("Player 1", "Terran Marine", 10, "Anywhere");
}
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Bring("Current Player", "Terran Marine", "Anywhere", Exactly, 10);
Switch("Switch0", set);
Actions:
Display Text Message(Always Display, "bring 10");
}
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Command("Current Player", "Terran Marine", At least, 12);
Switch("Switch0", set);
Actions:
Display Text Message(Always Display, "command at least 12");
}
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Always();
Actions:
Remove Unit At Location("Current Player", "Terran Marine", All, "Anywhere");
Set Switch("Switch0", clear);
Display Text Message(Always Display, "last");
}
//-----------------------------------------------------------------//
It displays
QUOTE
first
command 10
bring 10
command at least 12
last
It's like it's updating sometimes.
I believe it's that command doesn't update when units are removed. A more specific test needs to be done to prove this.
A further test seems to verify this theory, here's the triggers:
QUOTE
Trigger("Player 1"){
Conditions:
Always();
Actions:
Create Unit("Player 1", "Terran Marine", 1, "Anywhere");
Display Text Message(Always Display, "first");
}
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Always();
Actions:
Remove Unit At Location("Current Player", "Terran Marine", All, "Anywhere");
}
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Command("Current Player", "Terran Marine", Exactly, 1);
Actions:
Display Text Message(Always Display, "command exactly 1");
}
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Always();
Actions:
Display Text Message(Always Display, "last");
}
//-----------------------------------------------------------------//
The result was the following output:
QUOTE
first
command exactly 1
last
And to make sure, I substituted the command with bring, and only "first" and "last" was displayed.
Now the output of these next triggers is interesting:
QUOTE
Trigger("Player 1"){
Conditions:
Always();
Actions:
Create Unit("Player 1", "Terran Marine", 1, "Anywhere");
Display Text Message(Always Display, "first");
}
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Always();
Actions:
Remove Unit At Location("Current Player", "Terran Marine", All, "Anywhere");
}
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Always();
Actions:
Create Unit("Player 1", "Terran Marine", 2, "Anywhere");
Display Text Message(Always Display, "create 2");
}
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Command("Current Player", "Terran Marine", Exactly, 2);
Actions:
Display Text Message(Always Display, "command exactly 2");
}
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Command("Current Player", "Terran Marine", Exactly, 3);
Actions:
Display Text Message(Always Display, "command exactly 3");
}
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Always();
Actions:
Display Text Message(Always Display, "last");
}
//-----------------------------------------------------------------//
The output is
QUOTE
first
create 2
command 3
last
command 2
This shows that even though 1 marine was created and removed, and 2 more were created, within that trigger cycle, command will take the total, 3, and not take into account that 1 marine was removed.
The "command 2" output is in the next trigger cycle.