beginscript; label WaitForGVar1: if (GetGlobalVar(1) == 3) { if (OtherUnitDead(Apc_G04_01_Scr) != 1) { SetHUDTarget(Apc_G04_01_Scr); } else { if (OtherUnitDead(Apc_G04_02_Scr) != 1) { SetHUDTarget(Apc_G04_02_Scr); } else { if (OtherUnitDead(Apc_G04_03_Scr) != 1) { SetHUDTarget(Apc_G04_03_Scr); } else { if (OtherUnitDead(Apc_G04_04_Scr) != 1) { SetHUDTarget(Apc_G04_04_Scr); } } } } } // check apc's have droped soldires I.e don't count death if (OtherUnitInArea(Apc_G04_01_Scr,7433,-5937,80) && GetVar(1) != 1) { SetVar(1,1); } if (OtherUnitInArea(Apc_G04_02_Scr,7441,-6008,80) && GetVar(2) != 1) { SetVar(2,1); } if (OtherUnitInArea(Apc_G04_03_Scr,7363,-6111,60) && GetVar(3) != 1) { SetVar(3,1); } if (OtherUnitInArea(Apc_G04_04_Scr,7270,-6198,60) && GetVar(4) != 1) { SetVar(4,1); } // Check if each apc dead or droped off soldiers + init var is a go if ( (OtherUnitDead(Apc_G04_01_Scr) || GetVar(1) == 1) && (OtherUnitDead(Apc_G04_02_Scr) || GetVar(2) == 1) && (OtherUnitDead(Apc_G04_03_Scr) || GetVar(3) == 1) && (OtherUnitDead(Apc_G04_04_Scr) || GetVar(4) == 1)) { EndFrame(); goto SpawnGroup_c; } EndFrame(); goto WaitForGVar1; label SpawnGroup_c: if (OtherUnitDead(Apc_G04_01_Scr) && OtherUnitDead(Apc_G04_02_Scr) && OtherUnitDead(Apc_G04_03_Scr) && OtherUnitDead(Apc_G04_04_Scr)) { WaitForTime(30); } else { WaitForTime(300); } EndLevel(1); //TriggerUnit(Cutscene3A_Scr); //SetHUDTarget(0x45e); //SetHUDTarget(Spt_G03_01_Scr); EndFrame(); label SpawnGroup_c: label Waitfor: if (GetGlobalVar(2) == 2) { WaitForTime(50); TriggerUnit(Bhk_G08_01_Scr); //TriggerUnit(Bhk_G08_02_Scr); EndFrame(); goto WaitforSpits; } EndFrame(); goto Waitfor; label WaitforSpits: if (GetGlobalVar(2) == 3) { TriggerMessage(9,0xffff,0xffff); SetVar (0, GetTime()+800); EndFrame(); goto RefCheck; } EndFrame(); goto WaitforSpits; label RefCheck: if (GetGlobalVar(6) >= 4) { EndLevel(0); EndFrame(); goto End; } if (GetVar(0) < GetTime() || OtherUnitDead(Bhk_G08_01_Scr)) { if (OtherUnitDead(Bhk_G08_01_Scr)) WaitForTime(40); EndLevel(1); EndFrame(); goto End; } EndFrame(); goto RefCheck; label End: EndFrame(); goto End; endscript; $