Iceblade
Admiral
Right now here is the code. And Problem 1 is how to get this thing to end. And behind curtain no. 2 is problem 2 with was the on earth is a jump buoy, it is not a ship or a navpoint. For the ending just protect Midway and ensure destruction of the 2 capships. Also with the usual bonus-or not so bonus-objectives.
mission s0;
#include wcp, consts, pilots, utils;
#strings targetid;
#SetOutputPath("$wcso$\mission\");
object Nav1(Navpoint)
x:0;
y:0;
z:0;
main: M_Nav1;
navdata: 1, 10000;
end;
object Jump1();
x:1222;
y:222;
z:51;
main: M_Jump1;
targstr: targetid["Jump Buoy"];
end;
object Alpha1(Player)
obj: panthrbl;
x: 0;
y: 100;
z: 0;
main: M_Alpha1;
pilot: PILOT_Casey1;
targstr: targetid["Alpha 1"];
end;
object Stiletto(ship)
obj: panthrbl;
x: 240;
y: 340;
z: 110;
main: M_Stiletto;
pilot: 45;
targstr: 1;
end;
object Amazon(ship)
obj: panthrbl;
x: 300;
y: 100;
z: 400;
main: M_Amazon;
pilot: 1;
targstr: 1;
end;
object Maestro(ship)
obj: Shrike;
x: 200;
y: 100;
z: 120;
main: M_Maestro;
death: M_FDeath;
pilot: 22;
targstr: 1;
end;
object Ace(ship)
obj: AAceShip;
x: 2650;
y: 10;
z: 340;
main: M_Ace;
death: M_Death;
pilot: 95;
end;
function M_Death;
begin
m_AliveEnemies := m_AliveEnemies - 1;
m_DeadEnemies := m_DeadEnemies + 1;
end;
object Moray1(ship)
obj: Moray;
x: 2650;
y: 10;
z: 40;
main: M_Moray1;
//death: M_MDeath;
pilot: 110;
end;
object Manta1(ship)
obj: MANTA;
x: 2678;
y: 100;
z: 445;
main: M_Manta1;
pilot: 107;
end;
object Manta2(ship)
obj: MANTA;
x: 2667;
y: 290;
z: 50;
main: M_Manta2;
pilot: 108;
end;
object Manta3(ship)
obj: MANTA;
x: 2654;
y: 0;
z: 45;
main: M_Manta3;
pilot: 109;
end;
object Midway(Capship)
obj: Midway;
x: 0;
y: 0;
z: 0;
main: M_Midway;
pilot: PILOT_TCS_Midway;
direction: 0, 0, 0;
targstr: targetid["Midway"];
end;
object Destoryer(Capship)
obj: Orca;
x: 2340;
y: 555;
z: 108;
main: M_Orca;
pilot: 121;
direction: 0, 0, 0;
targstr: targetid["Orca"];
end;
object Cruiser(Capship)
obj: Hydra;
x: 6640;
y: 555;
z: 108;
main: M_Hydra;
pilot: 121;
direction: 0, 0, 0;
targstr: targetid["Hydra"];
end;
function M_Alpha1;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Confed);
SF_ActivateSelf(0);
SF_PlayerSwitchToCam(CamID_cockpit, Alpha1);
while(1) do
AI_WaitSeconds(1);
end;
function M_Stiletto;
begin
AI_AddToWing(Alpha1);
SF_SetObjectFlag (OF_alignment,ALIGN_Confed);
SF_ActivateSelf(0);
while(1) do
AI_WaitSeconds(1);
end;
function M_Amazon;
begin
AI_AddToWing(Alpha1);
SF_SetObjectFlag (OF_alignment,ALIGN_Confed);
SF_ActivateSelf(0);
while(1) do
AI_WaitSeconds(1);
end;
function M_Maestro;
begin
AI_AddToWing(Alpha1);
SF_SetObjectFlag (OF_alignment,ALIGN_Confed); //sets the player to confed alignment
SF_ActivateSelf(0);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_Ace;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Alien);
SF_ActivateSelf(1);
m_AliveEnemies := 1;
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_Moray1;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Alien);
SF_ActivateSelf(1);
//m_AliveEnemies := 1;
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_Manta1;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Alien);
SF_ActivateSelf(1);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_Manta2;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Alien);
SF_ActivateSelf(1);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_Manta3;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Alien);
SF_ActivateSelf(1);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_Jump1;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Neutral);
SF_ActivateSelf(1);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_Midway;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Confed);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_Orca;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Alien);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_Hydra;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Alien);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_FDeath;
begin
end;
function M_FMain;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Confed); //sets the player to confed alignment
SF_ActivateSelf(0);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_FSpawn(shipId, count, x, y, z);
var
ox, oy, oz;
begin
while(count > 0) do begin
ox := x + SYS_Random(600) - 300;
oy := y + SYS_Random(600) - 300;
oz := z + SYS_Random(600) - 300;
NAV_CreateShip(shipId, 146, 0, @M_FMain, @M_FDeath, ox, oy, oz);
AI_WaitMilliseconds(275);
count := count - 1;
end;
end;
function M_Nav1;
begin
Nav_ActivateSelf;
SF_ActivateObject(Midway, 0);
SF_ActivateObject(Destoryer, 1);
SF_ActivateObject(Cruiser, 0);
while(1) do begin
AI_WaitSeconds(1);
until(m_AliveEnemies = 0) do
begin
AI_WaitSeconds(1);
end;
M_Spawn(2,15,3450,640,233);
M_Spawn(30,8,4450,640,233);
M_Spawn(11,6,6000,640,233);
M_FSpawn(17,3,0,0,-134);
M_FSpawn(20,3,0,0,-120);
M_Spawn(9,6,6000,650,233);
end;
end;
function MAIN;
begin
MS_RunSpaceFlight(0);
//M_WaitUntilDead;
//SF_ObjectiveSetTotalNeededForSuccess(2, 13);
//MS_MissionSuccess;
//SF_Exit;
//BRIEF_Exit;
//GF_Exit;
end;
mission s0;
#include wcp, consts, pilots, utils;
#strings targetid;
#SetOutputPath("$wcso$\mission\");
object Nav1(Navpoint)
x:0;
y:0;
z:0;
main: M_Nav1;
navdata: 1, 10000;
end;
object Jump1();
x:1222;
y:222;
z:51;
main: M_Jump1;
targstr: targetid["Jump Buoy"];
end;
object Alpha1(Player)
obj: panthrbl;
x: 0;
y: 100;
z: 0;
main: M_Alpha1;
pilot: PILOT_Casey1;
targstr: targetid["Alpha 1"];
end;
object Stiletto(ship)
obj: panthrbl;
x: 240;
y: 340;
z: 110;
main: M_Stiletto;
pilot: 45;
targstr: 1;
end;
object Amazon(ship)
obj: panthrbl;
x: 300;
y: 100;
z: 400;
main: M_Amazon;
pilot: 1;
targstr: 1;
end;
object Maestro(ship)
obj: Shrike;
x: 200;
y: 100;
z: 120;
main: M_Maestro;
death: M_FDeath;
pilot: 22;
targstr: 1;
end;
object Ace(ship)
obj: AAceShip;
x: 2650;
y: 10;
z: 340;
main: M_Ace;
death: M_Death;
pilot: 95;
end;
function M_Death;
begin
m_AliveEnemies := m_AliveEnemies - 1;
m_DeadEnemies := m_DeadEnemies + 1;
end;
object Moray1(ship)
obj: Moray;
x: 2650;
y: 10;
z: 40;
main: M_Moray1;
//death: M_MDeath;
pilot: 110;
end;
object Manta1(ship)
obj: MANTA;
x: 2678;
y: 100;
z: 445;
main: M_Manta1;
pilot: 107;
end;
object Manta2(ship)
obj: MANTA;
x: 2667;
y: 290;
z: 50;
main: M_Manta2;
pilot: 108;
end;
object Manta3(ship)
obj: MANTA;
x: 2654;
y: 0;
z: 45;
main: M_Manta3;
pilot: 109;
end;
object Midway(Capship)
obj: Midway;
x: 0;
y: 0;
z: 0;
main: M_Midway;
pilot: PILOT_TCS_Midway;
direction: 0, 0, 0;
targstr: targetid["Midway"];
end;
object Destoryer(Capship)
obj: Orca;
x: 2340;
y: 555;
z: 108;
main: M_Orca;
pilot: 121;
direction: 0, 0, 0;
targstr: targetid["Orca"];
end;
object Cruiser(Capship)
obj: Hydra;
x: 6640;
y: 555;
z: 108;
main: M_Hydra;
pilot: 121;
direction: 0, 0, 0;
targstr: targetid["Hydra"];
end;
function M_Alpha1;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Confed);
SF_ActivateSelf(0);
SF_PlayerSwitchToCam(CamID_cockpit, Alpha1);
while(1) do
AI_WaitSeconds(1);
end;
function M_Stiletto;
begin
AI_AddToWing(Alpha1);
SF_SetObjectFlag (OF_alignment,ALIGN_Confed);
SF_ActivateSelf(0);
while(1) do
AI_WaitSeconds(1);
end;
function M_Amazon;
begin
AI_AddToWing(Alpha1);
SF_SetObjectFlag (OF_alignment,ALIGN_Confed);
SF_ActivateSelf(0);
while(1) do
AI_WaitSeconds(1);
end;
function M_Maestro;
begin
AI_AddToWing(Alpha1);
SF_SetObjectFlag (OF_alignment,ALIGN_Confed); //sets the player to confed alignment
SF_ActivateSelf(0);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_Ace;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Alien);
SF_ActivateSelf(1);
m_AliveEnemies := 1;
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_Moray1;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Alien);
SF_ActivateSelf(1);
//m_AliveEnemies := 1;
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_Manta1;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Alien);
SF_ActivateSelf(1);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_Manta2;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Alien);
SF_ActivateSelf(1);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_Manta3;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Alien);
SF_ActivateSelf(1);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_Jump1;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Neutral);
SF_ActivateSelf(1);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_Midway;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Confed);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_Orca;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Alien);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_Hydra;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Alien);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_FDeath;
begin
end;
function M_FMain;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Confed); //sets the player to confed alignment
SF_ActivateSelf(0);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_FSpawn(shipId, count, x, y, z);
var
ox, oy, oz;
begin
while(count > 0) do begin
ox := x + SYS_Random(600) - 300;
oy := y + SYS_Random(600) - 300;
oz := z + SYS_Random(600) - 300;
NAV_CreateShip(shipId, 146, 0, @M_FMain, @M_FDeath, ox, oy, oz);
AI_WaitMilliseconds(275);
count := count - 1;
end;
end;
function M_Nav1;
begin
Nav_ActivateSelf;
SF_ActivateObject(Midway, 0);
SF_ActivateObject(Destoryer, 1);
SF_ActivateObject(Cruiser, 0);
while(1) do begin
AI_WaitSeconds(1);
until(m_AliveEnemies = 0) do
begin
AI_WaitSeconds(1);
end;
M_Spawn(2,15,3450,640,233);
M_Spawn(30,8,4450,640,233);
M_Spawn(11,6,6000,640,233);
M_FSpawn(17,3,0,0,-134);
M_FSpawn(20,3,0,0,-120);
M_Spawn(9,6,6000,650,233);
end;
end;
function MAIN;
begin
MS_RunSpaceFlight(0);
//M_WaitUntilDead;
//SF_ObjectiveSetTotalNeededForSuccess(2, 13);
//MS_MissionSuccess;
//SF_Exit;
//BRIEF_Exit;
//GF_Exit;
end;