beginscript; label Wait: if (GetState() != 0 && GetState() != 8 && UnitDead() != 1) { ExcTargetType(0xffffffff); IncTargetType(0x80); IncTargetType(0x2); SetFollowRange(0); IncludeUTarget(NPTarget3); EndFrame(); goto Unspawn; } EndFrame(); goto Wait; label Unspawn: if (GetState() == 0) { EndFrame(); goto Spawn2; } EndFrame(); goto Unspawn; label Spawn2: if (GetState() != 0 && GetState() != 8 && UnitDead() != 1) { ExcTargetType(0xffffffff); IncTargetType(0x80); IncTargetType(0x2); SetFollowRange(0); ExcludeUTarget(NPTarget3); IncludeGTarget(2); EndFrame(); goto Wait2; } EndFrame(); goto Spawn2; label Wait2: if (Triggered()) { if (OtherUnitDead(APC_G1_2) != 1) { EnterVehicle (GetUnitID(), APC_G1_2); } else if (OtherUnitDead(APC_G2_1) != 1) { EnterVehicle (GetUnitID(), APC_G2_1); } EndFrame(); goto Check; } EndFrame(); goto Wait2; label Check: if (GetState() == 0 || UnitDead()) { IncGlobalVar(3); if (UnitDead()) IncGlobalVar(5); EndFrame(); goto End; } if ((OtherUnitDead(APC_G1_2) || OtherUnitDead(APC_G1_2)) && GetVar(0) != 1) { if (OtherUnitDead(APC_G1_2) != 1) { EnterVehicle (GetUnitID(), APC_G1_2); } else if (OtherUnitDead(APC_G2_1) != 1) { EnterVehicle (GetUnitID(), APC_G2_1); } SetVar(0,1); } if (OnFire(GetUnitID()) && GetVar(1) != 1) { SetVar(1,1); } else if (OnFire(GetUnitID()) != 1 && GetVar(1) == 1) { SetVar(1,0); if (OtherUnitDead(APC_G1_2) != 1) { EnterVehicle (GetUnitID(), APC_G1_2); } else if (OtherUnitDead(APC_G2_1) != 1) { EnterVehicle (GetUnitID(), APC_G2_1); } } EndFrame(); goto Check; label End: EndFrame(); goto End; endscript; $