Ok, im no Q, but i can get this to work
--------------------------------------------------------------------------------
unit test1; * this should be the name of the mission, maybe this is the reason the file isnt created?
#AddToSearchPath("d:\games\wing commander\secret ops\language\");
#SetOutputPath("d:\games\wing commander\secret ops\mission");
#Include wcp, comms, pilots, ships, utils;
#Strings targetid, spacefli;
#Sector: "sim.sec";
object Player(Player)
obj: "piranha";
x: 0;
y: 0;
z: 0; * you need to place the player inside the navpoint
main: M_Player;
// death: D_Player;
targstr: targetid["ALPHA 1"]; *player doesnt have that kind of denomination, its your callsign
direction: 0, 10000, 0;
pilot: PILOT_Casey1;
end;
object Nav1(Navpoint)
x: 0;
y: 0;
z: 2000;
main: M_Nav1;
name: spacefli["Nav 1"];
navdata: 1, // nav id
25000; // diameter
end;
function M_Nav1;
begin
if (SF_GetDistance(Player)<12500) then begin
NAV_ActivateSelf;
NAV_SetPlayerNav(1)
end;
end; * Yor m_nav1 function is incorrect
function M_Player;
begin
SF_SetObjectFlag(OF_Alignment,
ALIGN_Confed);
SF_BindToActionSphere(1); *Always set player to SF_BindToActionSphere(0), so the player appear in all navpoints
SF_ActivateSelf(1); *Same here
while (1) do
AI_WaitSeconds(1);
end;
* no main function
--------------------------------------------------------------------------------
Should be like this:
--------------------------------------------------------------------------------
mission s0;
#AddToSearchPath("d:\wing commander\secret ops\language\");
#SetOutputPath("d:\wing commander\secret ops\mission");
#Include wcp, comms, pilots, ships, utils;
#Strings targetid, spacefli;
#Sector: "sim.sec";
object Player(Player)
obj: piranha;
x: 0;
y: 0;
z: 2000;
main: M_Player;
direction: 0, 10000, 0;
pilot: PILOT_Casey1;
end;
object Nav1(Navpoint)
x: 0;
y: 0;
z: 2000;
main: M_NAV1;
name: spacefli["Nav 1"];
navdata: 1, 25000;
end;
function M_NAV1;
begin
while(1) do begin
if (NAV_WithinSphere(Player)) then begin
NAV_ActivateSelf;
while(NAV_WithinSphere(Player)) do begin
AI_WaitSeconds(1);
end;
NAV_DeactivateSelf;
end;
AI_WaitSeconds(1);
end;
end;
function M_Player;
begin
SF_SetObjectFlag(OF_Alignment, ALIGN_Confed);
SF_BindToActionSphere(0);
SF_ActivateSelf(0);
while (1) do AI_WaitSeconds(1);
end;
function MAIN;
begin
MS_RunGameflow(0);
MS_RunSpaceflight(0);
end;
--------------------------------------------------------------------------------
I tested it and works fine, hope it helps.