beginscript; label WaitForSpawn: if (GetState() != 0 && UnitDead() != 1) { ExcTargetType(0xffffffff); SetFollowRange(0); DisableAvoidanceTurn (1); EndFrame(); goto Wait; } EndFrame(); goto WaitForSpawn; label Wait: if (GetGlobalVar(4) == 4 && GetVar(3) != 1) { SetVar(2, GetTime() + 250); SetVar(3,1); } if (PlayerInRange(350) && GetGlobalVar(4) == 4) { IncTargetType(0xffffffff); ExcTargetType(0x1); IncTargetType(0x2); IncludeGTarget(2); SetGlobalVar(4,3); WaitForTime(10); SetFollowWaypoint(164,0,0); SetFollowRange(0); TriggerUnit(Jep_Gr1_02_Scr); TriggerMessage(14,h14,0xffff); WaitForTime(20); //PlaySound(0x7401, Vzpowerrelayattk2,0); WaitForTime(80); if (OtherUnitDead(Drg_Gr3_01_Scr)) SpawnOtherUnit (Drg_Gr3_01_Scr); if (OtherUnitDead(Drg_Gr3_02_Scr)) SpawnOtherUnit (Drg_Gr3_02_Scr); if (OtherUnitDead(Drg_Gr3_03_Scr)) SpawnOtherUnit (Drg_Gr3_03_Scr); SpawnOtherUnit (Drg_Gr0_02_Scr); SetVar (1, GetTime()+50); EndFrame(); goto WaitForStop; } else if (GetGlobalVar(4) == 4 && GetVar(2) < GetTime()) { SetVar(2, GetTime() + 300); TriggerMessage(33,h33,0xffff); } EndFrame(); goto Wait; label WaitForStop: if (PlayerInRange(500) != 1 && GetVar(1) < GetTime()) { TriggerMessage(15,h15,0xffff); WaitForTime(20); SetVar (1, GetTime()+250); } if (GetFollowMode() == 3) { ExitVehicle (Eng_G2_1, Eng_G1,174); WaitForTime(10); ExitVehicle (Eng_G2_2, Eng_G1,175); WaitForTime(10); ExitVehicle (Eng_G2_3, Eng_G1,176); WaitForTime(10); ExitVehicle (Eng_G2_4, Eng_G1,178); WaitForTime(10); TriggerMessage(45,h45,0xffff); SetVar(2, GetTime() + 300); EndFrame(); goto CheckForFail; } if (UnitDead() && GetFollowMode() != 3 && GetGlobalVar(3) < 1) { PausePlayer(); ChangeCamera(0x814,50,50); TriggerMessage(17,h17,0x783b); SetButtonJump(); if (HasJumped()) { goto skipcs1; } WaitForTime(80); JumpOnButton(false); label skipcs1: EndLevel(0); EndFrame(); goto End; } EndFrame(); goto WaitForStop; label CheckForFail: if (Triggered() && GetVar(4) != 1) { SetVar(4,1); TriggerUnit(SparkGen1); TriggerUnit(SparkGen2); TriggerUnit(SparkGen3); } if (UnitDead() && GetFollowMode() != 3 && GetGlobalVar(3) < 1) { PausePlayer(); ChangeCamera(0x814,50,50); TriggerMessage(17,h17,0x783b); SetButtonJump(); if (HasJumped()) { goto skipcs1; } WaitForTime(80); JumpOnButton(false); label skipcs1: EndLevel(0); EndFrame(); goto End; } if (OtherUnitDead(Eng_G2_1) || OtherUnitDead(Eng_G2_2) || OtherUnitDead(Eng_G2_3) || OtherUnitDead(Eng_G2_4) && GetVar(5) != 1) { TriggerMessage(18,h18,0xffff); WaitForTime(20); //PlaySound(0x7401, Vzpowerrelayattk3,0); SetVar(5,1); } if (OtherUnitDead(Eng_G2_1) && OtherUnitDead(Eng_G2_2) && OtherUnitDead(Eng_G2_3) && OtherUnitDead(Eng_G2_4) && GetVar(4) != 1 && GetVar(6) != 1) { PausePlayer(); SetVar(6,1); ChangeCamera(0x80d,50,50); TriggerMessage(17,h17,0xffff); SetButtonJump(); if (HasJumped()) { goto skipcs2; } WaitForTime(20); //PlaySound(0x7401, Vztoomanydead,0); WaitForTime(60); JumpOnButton(false); label skipcs2: EndLevel(0); EndFrame(); goto End; } if (GetGlobalVar(7) >= 4 || (OtherUnitDead(Eng_G2_1) && OtherUnitDead(Eng_G2_2) && OtherUnitDead(Eng_G2_3) && OtherUnitDead(Eng_G2_4) && GetVar(4) == 1)) { SetGlobalVar(3,1); TriggerMessage(58,h58,0x780c); SetFollowWaypoint(189,0,0); WaitForTime(20); TriggerUnit(Jep_Gr1_02_Scr); EndFrame(); goto End; } if (PlayerInRange(500) != 1 && GetVar(2) < GetTime()) { SetVar(2, GetTime() + 300); TriggerMessage(44,h44,0xffff); } if (GetGlobalVar(3) == 1) { EndFrame(); goto End; } EndFrame(); goto CheckForFail; label End: EndFrame(); goto End; endscript; $