function afterTriggerExec() {
while(Bring(P1, AtLeast, 1, "Zerg Drone", "Anywhere")) {
MoveLocation("loc", "Zerg Drone", P1, "Anywhere");
RemoveUnitAt(1, "Zerg Drone", "loc", P1);
CreateUnit(1, "Zerg Mutalisk", "loc", P1);
}
}
/* __epspy__ makes 3 Triggers for 3 actions, 2 objects are wasted.
def afterTriggerExec():
if EUDWhile()(Bring(P1, AtLeast, 1, "Zerg Drone", "Anywhere")):
DoActions(MoveLocation("loc", "Zerg Drone", P1, "Anywhere"))
DoActions(RemoveUnitAt(1, "Zerg Drone", "loc", P1))
DoActions(CreateUnit(1, "Zerg Mutalisk", "loc", P1))
EUDEndWhile()
*/
It should use 1 DoActions in a series of actions for performance and map file size.
Copied from phu54321/epScript#5