triple post--sorry
Well, I started from the point I uploaded on this forum. I made Maestro a new wing, 3 wasps spawned and joined me and 3 shrikes joined him. Then comes nav3 and I am going along, aliens launching the carrier and then KKAABOOOMM!
CMcp::fundFunctionStart - Object spawn32
Function blah blah(meaningless numbers to me) (main no clue (used Nav_CreateShip)) not found!
What exactly does this mean--I think it means that it either can't find the ship it is supposed to spawn(doesn't make any since) or that it doesn't see the main function for the ships that it is spawning(also doesn't make any sense).
Here is the code anyway.
function M_Maestro;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Confed);
SF_ActivateSelf(0);
AI_SetAutopilotData(50, -50, -50);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_Midway;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Confed);
SF_BindToActionSphere(1);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_FSpawnLaunchFrom(shipID, count, Launcher);//friendly
var
i,
pilotline;
begin
pilotline := 27;
for i := 0 to (count - 1) do begin
NAV_CreateShipLaunch(shipId, pilotline, 0, @M_FMain, @M_FDeath, Launcher);
pilotline := pilotline + 2;
AI_WaitSeconds(2);
end;
end;
function M_FMain;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Confed);
SF_ActivateSelf(0);
AI_AddToWing(Maestro);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_FDeath;
begin
end;
function M_FWSpawnLaunchFrom(shipID, count, Launcher); //friendly wasp
var
i,
pilotline;
begin
pilotline := 41;
for i := 0 to (count - 1) do begin
NAV_CreateShipLaunch(shipId, pilotline, 0, @M_FWMain, @M_FWDeath, Launcher);
pilotline := pilotline + 1;
AI_WaitSeconds(2);
end;
end;
function M_FWMain;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Confed);
SF_ActivateSelf(0);
AI_AddToWing(Alpha1);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_FWDeath;
begin
end;
function M_FBSpawn(shipId, count, x, y, z);friendly bomber
var
pilotline,
ox, oy, oz;
begin
pilotline := 43;
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, Pilotline, 0, @M_FBMain, @S_EnemyFighterDeath, ox, oy, oz);
pilotline := pilotline + 2;
AI_WaitMilliseconds(275);
count := count - 1;
end;
end;
function M_FBMain;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Confed);
SF_ActivateSelf(0);
AI_AddToWing(Maestro);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_FBESpawn(shipId, count, x, y, z);//friendly bomber escort
var
pilotline,
ox, oy, oz;
begin
pilotline := 27;
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, Pilotline, 0, @M_FBEmain, @S_EnemyFighterDeath, ox, oy, oz);
pilotline := pilotline + 2;
AI_WaitMilliseconds(275);
count := count - 1;
end;
end;
function M_FBEMain;
begin
SF_SetObjectFlag (OF_alignment,ALIGN_Confed);
SF_ActivateSelf(0);
AI_AddToWing(Alpha1);
while(1) do begin
AI_WaitSeconds(1);
end;
end;
function M_Nav1;
var
setup = 1;
begin
while(1) do begin
if(NAV_WithinSphere(Alpha1)) then begin
Nav_ActivateSelf;
SF_ActivateObject(Midway, 0);
SF_ActivateObject(Plunkett, 0);
SF_ActivateObject(Destroyer, 1);
SF_ActivateObject(Cruiser, 1);
if (setup) then begin
AI_WaitSeconds(30);
AI_WaitSeconds(1);
M_FSpawnLaunchFrom(41, 3, Midway);
M_FWSpawnLaunchFrom(45, 3, Midway);
AI_WaitSeconds(5);
......
function M_Nav3;
var
setup3 = true;
begin
NAV_ShowSelf;
while(1) do begin
if (NAV_WithinSphere(Alpha1)) then begin
Nav_ActivateSelf;
SF_ActivateObject(Carrier, 0);
SF_ActivateObject(Destroyer1, 0);
SF_ActivateObject(Destroyer2, 0);
if (setup3) then begin
M_SpawnLaunchFrom(6, 13, Carrier);
M_SpawnLaunchFrom(3, 10, Carrier);
M_FBSpawn(37, 2, 22000, 22100, 4950);
M_FBESpawn(42, 3, 22140, 22100, 4950);
setup3 := false;
end;
if (NAV_WithinSphere(Alpha1) = 0) then begin
Nav_DeactivateSelf;
end;
if (NAV_WithinSphere(Alpha1)) then begin
AI_WaitSeconds(1);
end;
NAV_SetPlayerNav(1);
Complete := 1;
end;
end;
end;