Or you make 2 triggers:
1st one detects when a building is finished, then let the building train the specified unit (via if's)
2nd one is, when a building finishes training a unit, order the building to train another.
The upper function works, too and is easier i think.
No, it doesn't.bj_destroy_group cause trigger malfunction in most events of type every X seconds and i think pick every unit doesn't cause leak becouse technical it's imposible to select 1 unit more than 1 time. Btw you always can use the GUI trigger unit remove last picked unit from last created unit group if you think there is leaks
Or you make 2 triggers:
1st one detects when a building is finished, then let the building train the specified unit (via if's)
2nd one is, when a building finishes training a unit, order the building to train another.
The upper function works, too and is easier i think.