Pascal--nonrecruitment thread

Iceblade said:
My Quarto
Such a simple phrase... and so disturbing :(.

As for your error, is that the entire message, or does it say which object it's talking about? Anyway, I can't remember if I ever encountered this problem, but here are two possibilies that I can think of right now:

1. You're trying to add too many ships to one wing. IIRC, there's a limit, because for every formation type, there is a limited number of wingman coordinates entered into formation.iff.
2. You're trying to add ships to the wing of a spawned object. This one's pretty unlikely, though, since it would be difficult to do this and not get a WCPPas error.
 
OOPPPPSSSSSS!!!! :eek:

AAAHAHHAHH!! Talk about a bad typo, that was supposed to be maybe. :eek:

Sorry. :p


Well, it happens before the spawns and I have also commented out the spawns and I have even commented out and restored everything back to what it was before(basically) and it still does this. I don't get it. I also have room on my wing. Maybe for some stupid reason it doesn't like the postitions of those alien caps.

Lemme take another look through it.
 
Nope and I just do not get it? I will try and add this stuff in piece by piece to an earlier one and hope I find out what has gotten this thing fuc**d up.

Oh yes, how do you spawn ships that are not in the ships.pas. Is there a way to get the mission to look in the ships folder to find the ship I need--a cdrone or your miner probe. Also, is there anyway to fix those targetids to say what I want it to say--kindof like that trick with putting in "as _____" after the objects name?
 
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;
 
I don't really see what's causing the problem. Experiment a bit - try to work out what exactly causes the problem by removing things and seeing if it solves the problem. If you can narrow it down to a specific line or function, you'll be able to fix it simply by comparing it to other functions that work properly.
 
I think that the problem can be in spawn friendly ships.
You can create the friendly ships how objects, this is for future references when you use function with references to that objects. Spwned object don't assign objects "names" to reference it.

Now, looking quick lyyour code, your M_Maestro function don't have a bindtoactionsphere.... try assign it that function.
 
YYYYYYEEEEEEEEEESSSSSSSSSSSSSSSSSSS!!!!!!!!!!!


"Who yah! Mission Accomplished." IT WORKS!!

Victory Dance--ooohhh!!!!!!! YAAAHHH!! :D :D

The problem was something as stupid as the main function needing to be before the spawn's primary function. MUST MUST MUST remember that one. Talk about finicky.

Well, I will post the final mission code in the other thread.
 
Hey, any of you know the answer to this question:
Oh yes, how do you spawn ships that are not in the ships.pas. Is there a way to get the mission to look in the ships folder to find the ship I need--a cdrone or your[UE's] miner probe. Also, is there anyway to fix those targetids to say what I want it to say--kindof like that trick with putting in "as _____" after the objects name?
 
Ah, must have overlooked that question. Well, you can change which ships are spawnable by editing game\ship.iff. For example, in UE, we alter ship slot 38 to use the cdrone (which is precisely what the miner probe is) instead of yet another version of the panther. As for the targetids, I've already explained what you can do - look in a previous post in this thread.
 
hmmmm.... didn't work, it doesn't appear to be registering the change in data in the ships.pas. Very curious. :confused:

As for the targetid thing...well...it didn't work for the fighters(enemy or ally). :(
 
I think you're confusing ships.pas (the file in \lib) with ship.iff (the file inside data.tre, in \game).

Yes, the targetid thing I mentioned only works for capships. For fighters, you just change the object's targstr property.
 
How do you guys set up a cienmatic in pascal? I looked and I don't see it.

I need to know how to set the player's cam on a particular object or a set position.

Also, where are the 2 generic capship comms for SO? It gets really dumb with that same guy saying "No problems at this time" when I ask for status from different caps.
 
A cinematic is a mission like any other... except that you use a camera to change the point of view. You can find all the necessary camera commands in wcp.pas. As for generic capship pilots, they begin at 162 (161 is the Cerberus pilot), and go on up to 176. Mind you, there's a lot of voice recycling in there, so don't be surprised if you get a case of deja vu... or, rather, deja entendu :p.
 
Cameras

How do you implement these? The documentation on Bruckner's site is really incomplete in this area and frankly these codes don't work like the others that I have used. Probably has something to do with these unknowns (u1-u6). Well, what needs to go in these fields when I want to track an object.
 
Would be good if you mentioned which function specifically you're asking about... however, since you mention u1 to u6, I'm assuming you must be referring to either SF_CAM_TrackPivot or SF_CAM_SetMotion. In both cases, the first six variables are the x, y, and z coordinates for the point of origin and the ending point (in the case of TrackPivot, for a camera rotation, in the case of SetMotion... well, guess :p). The seventh variable is the time, in seconds.
 
it is offical, I am not good at noticing things

I must not of looked down the whole line and missed those "SF_Cam"s. I was actually talking about the CAM_... functions.

Hmmmm.....
NAV_Create Ship--how simple and I bet it doesn't even require all that junk the "M_spawn"s have. Man, this really supports my belief in everything happens for a reason, I found this nice little function--won't work very well for multiple pilots created by one of these functions, though, but I will just use the M_Spawn for creating friendlies.
__________________________________
Oh boy. Again with the "Nav1: Unknown AI command attempted:[blah blah]."

Here is the code, now what am I doing wrong--this doesn't make any sense.

function M_Nav1;
var
setup2 = 1;
begin
while(1) do begin
if(NAV_WithinSphere(player)) then begin
Nav_ActivateSelf;
if (setup2) then begin
AI_WaitSeconds(3);
var := true;
if(var) then begin
SF_CAM_TrackObj(Wing1);
var := false;
end;
AI_WaitSeconds(3);
setup2 := 0;
end;
if (NAV_WithinSphere(Player) = 0) then begin
NAV_DeactivateSelf;
end;
if(Nav_WithinSphere(Player)) then begin
AI_WaitSeconds(1);
end;
NAV_SetPlayerNav(3);
end;
end;
end;

*note: code amended for sake of security :p ....and no, I just stuck "var" in the post so as to not give anything away
 
Back
Top