Ah, well, in that case, use this:
[] spawn {
while {alive civ && alive guard1} do {
civ switchMove "ActsPercMstpSnonWpstDnon_sceneBardak02";
waitUntil {(animationState civ != "ActsPercMstpSnonWpstDnon_sceneBardak02") && alive civ && alive guard1};
};
};
[] spawn {
while {alive guard1} do {
guard1 switchMove "CtsDoktor_Vojak_uder1";
waitUntil {(animationState guard1 != "CtsDoktor_Vojak_uder1") && alive guard1};
};
};
[] spawn {
waitUntil {!(alive guard1)};
civ switchMove "AmovPercMstpSnonWnonDnon";
guard1 switchMove "AmovPercMstpSlowWrflDnon";
};
That will make it so that when the guard is killed both units' animations will reset and the loop will stop.