beginscript; SetGlobalVar(3,0); label Wait: if (GetState() != 0 && UnitDead() != 1) { // SetFollowUnit(APC_G2_2, 20, 20); SetFollowRange(0); EndFrame(); goto InRange; } EndFrame(); goto Wait; label InRange: if (OtherUnitInRange(APC_G2_2,30) && OtherUnitDead(APC_G1_2) != 1) { WaitForTime(600); EnterVehicle (GetUnitID(), APC_G1_2); EndFrame(); goto InRange2; } else if (OtherUnitDead(APC_G1_2)) { WaitForTime(600); // EnterVehicle (GetUnitID(), APC_G2_2); EndFrame(); goto InRange2; } if (UnitDead() && GetVar(0) != 1) { SetGlobalVar(3,GetGlobalVar(3)+1); SetVar(0,1); EndFrame(); goto End; } EndFrame(); goto InRange; label InRange2: if (UnitDead() && GetVar(0) != 1) { SetGlobalVar(3,GetGlobalVar(3)+1); SetVar(0,1); EndFrame(); goto End; } if (OtherUnitInRange(APC_G1_2,30) || OtherUnitDead(APC_G1_2)) { WaitForTime(30); DespawnUnit(); SetGlobalVar(3,GetGlobalVar(3)+1); if (GetGlobalVar(3) >= 4) { //SetGlobalVar(0,4); //TriggerMessage(26,0xffff,0xffff); } EndFrame(); goto End; } EndFrame(); goto InRange2; label End: EndFrame(); goto End; endscript; $