WC:SO - Briefings

Jason, first forget the briefing, try run the mission without it. Comment "//" the briefing comand on the main function, when you don't get errors then begin with brief functions. ".srs" mission has not necessary a brief, test that and review if the same error appear.
 
The mission works just fine without the brief, I don't get any errors when I complie it, nor when I run it, except when the briefing fuction is added in.

Tango: any chance of you posting some sample mission code (in it's entirity, with brief) for me to look at so I can reverse engineer the problem?
 
Well as I promised here I send the necessary code on a common brief function
There you can review and check with your code.
Functions must be sorted as here there are, this, you put the brief functions at end and declare "brief" and "color" to each brief object.
The command to open a briefing is MS_RunBriefing and is declared on MAIN function.

#sector: "yoursector.sec";
#include wcp;
#include consts;
#include comms;
#strings spacefli;
#strings targetid;
#strings objectiv;
#SetRooms ("your.rom","");

object Player(Player)
obj: ST_SHIP_Stiletto;
x: 20;
y: 0;
z: 0;
main: M_Player;
brief: B_Player;
pilot: Pilot_Casey1;
color: 0, 0.8, 0.8, 0.0;
end;

object Nav1(Navpoint)
x: 0;
y: 0;
z: 0;
main: M_NAV1;
brief: B_Nav;
color: 0,0,1,1;
name: Spacefli["Nav 1"];
navdata: 1, 10000;
end;

function MAIN;
begin
MS_RunGameflow(0);
MS_RunBriefing;
MS_RunSpaceflight(0);
end;

function M_Player;
begin
... your player code here
AI_WaiSeconds(1);
end;

function M_NAV1;
begin
... your nav code here
AI_WaiSeconds(1);
end;


function B_Player;
begin
BRIEF_CAM_SetActive(1);
BRIEF_CAM_SetPos(0, 500, 0);
BRIEF_CAM_TrackObj(Player);
BRIEF_SetAppearance(ST_APPEARANCE_Stiletto);
BRIEF_FaceObject(Nav2);
BRIEF_Activate;

SYS_PlaySFX(SFX_BRIEF_Blowup);
BRIEF_WaitSeconds(1);

BRIEF_VoiceOver(02, 0, 4);
BRIEF_WaitSeconds(4);
BRIEF_VoiceOver(02, 1, 7);
BRIEF_GotoObjRelFrameSeconds(Nav2, -10, 0, -40, 7, 0);
BRIEF_VoiceOver(02, 2, 5);
BRIEF_WaitSeconds(5);
SYS_PlaySFX(SFX_BRIEF_Activate);
BRIEF_VoiceOver(02, 3, 5);
BRIEF_WaitSeconds(5);
BRIEF_VoiceOver(02, 4, 4);
BRIEF_WaitSeconds(6);
BRIEF_Exit;
while(1) do BRIEF_WaitSeconds(1);
end;


function B_Nav;
begin
BRIEF_Activate;
BRIEF_DisplayName(1);
BRIEF_SetSize(100);
BRIEF_SetAppearance(1);
while(1) do BRIEF_WaitSeconds(1);
end;
 
Hmmm...that's fascinating...does that mean that for every object I'm going to have appear in the briefing, I need to have a brief: B_nav; (for example) and then do my code for B_Nav....cool...
 
Eh...still getting the same Error, Tango can you test & post full code for a mission (the code above contains refrences to a Nav2)...

And oh crap, I just realized something.

There are two version of WCPPascal installed on my computer, I believe this was the recomendation of an older thread. One version is good for compiling and one version is good for decompiling....

Can someone please tell me which is which or link me to the thread?


Note: Just so you know, the reason I ask for this is because I work nights. I sleep all day and only check WCNEWS in the morning (which means I'm reading yesterday's news for the first time).
 
Ya de dah de dah...

I found the other thread, version 24c is the best one, and I'm using it, and it still ain't running...

...help?
 
Yes, Nav2 not exist but was a sample code to explain how briefiengs work, replace Nav2 by Nav1. Also you note ST_APPEARANCE_Stiletto is a constant pointing to a number.
I send you all brief common functions, now to begin test quote comment some lines to avoid errors. You said that on a error message, do you still getting that error?
Have you discover which line cause the error because now you have a sample about how brief work in a code mission (and I'm not magician to discover what's happen :p )

Related to compler, yes you must use 24c.
 
Yes. The only way to avoid the error is to keep ALL briefing commands out of the mission.

Can you post a sample mission code, beginning to end, with a full briefing for me? Something that's been tested so you know it works, so I can just throw it into WCP Pascal, compile it and run it, just to make sure it's not my game or my compiler?
 
Surelly IS NOT your complier...
Look, first remove the functions and the briefing command on the MAIN function.
Only let the property declaration on objects (properties brief and color)
Test.
If work then add the functions and delete all unecessary. AT THIS TIME don't add the MAIN briefing function. Only add this code:

function B_Player;
begin
BRIEF_CAM_SetActive(1);
BRIEF_CAM_SetPos(0, 500, 0);
BRIEF_CAM_TrackObj(Player);
BRIEF_SetAppearance(ship apparence number here);
BRIEF_Activate;
BRIEF_WaitSeconds(1);
while(1) do BRIEF_WaitSeconds(1);
BRIEF_Exit;
end;

function B_Nav;
begin
BRIEF_Activate;
BRIEF_DisplayName(1);
BRIEF_SetSize(100);
BRIEF_SetAppearance(1);
while(1) do BRIEF_WaitSeconds(1);
end;

Set the object APPEARANCE rightly where I write "ship apparence number here" on b_player function adding that the you ship have to use.
Compile and build

If the mission work fine, add in the MAIN function the called to the briefing.

I'm so sorry but I can not send you more code for two motives, one: because I'm not the ownership (if do you want some standoff code would be better request it to Quarto/Eder), and two: anyway that's all for briefings working fine!, I'm sure any complete mission that I could send you only would complicate the thinks because we are using many CONSTANTS declarations readed on different files and the code could fail on other places.
The mission that I write is a standoff extraction, and it has all necessary function I'm sure.
Oh!, forget the compiler problem, if the compiler would have problems also will failure on any mission without briefings.
 
Sorry, not asking for Standoff Code. I understand the reluctance to give it, and respect that need.

I was just hoping you might have some lying around somewhere. =P

I'll test that as soon as my computer comes online...assuming it does so...
 
Back
Top