Jump to content
Sign in to follow this  
Ramon Berenguer IV

Why this damn init.sqf doesn't work?

Recommended Posts

Well, I have this big problem: I start my mission, but the Notes and Tasks are not showed, even if I've already created them in the briefing.sqf; so I tought twas because of the init.sqf. Here is it:

//begin init.sqf

//Add briefing

nul=[] execVM “briefing.sqfâ€;

if(true) exitWith {};

Share this post


Link to post
Share on other sites

Delete the last if exitwith line, it is unneeded. Also please post the briefing.sqf aswell.

Share this post


Link to post
Share on other sites

[] execVM "briefing.sqf"

But just write the content from the briefing.sqf into the init.sqf if that's all you have in the inti.sqf

If the briefing is not shown or only parts of it then most probably something is wrong with the briefing.

Share this post


Link to post
Share on other sites

Quotation marks looks weird.

Ҡvs ""

Share this post


Link to post
Share on other sites

Here is the briefing.sqf, aswell:

waitUntil {!(isNull player)};

waitUntil {player==player};

switch (side player) do

{

case WEST:

{

player createDiaryRecord ["Diary",["Promemoria","Puoi uccidere il soldato come preferisci."]];

tskobj_1=player createSimpleTask ["Uccidi il soldato"];

tskobj_1 setSimpleTaskDescription ["Devi uccidere il soldato vicino a te per vedere se funziona il file briefing.","Uccidi il soldato","Uccidi il soldato"];

player setCurrentTask tskobj_1;

};

case EAST:

{

};

case RESISTANCE:

{

};

case CIVILIAN:

{

};

};

Share this post


Link to post
Share on other sites

This in the init.sqf works just fine here:

waitUntil {!(isNull player)};
waitUntil {player==player};

switch (side player) do
{
 case WEST:
 {
   player createDiaryRecord ["Diary",["Promemoria","Puoi uccidere il soldato come preferisci."]];
   tskobj_1=player createSimpleTask ["Uccidi il soldato"];
   tskobj_1 setSimpleTaskDescription ["Devi uccidere il soldato vicino a te per vedere se funziona il file briefing.","Uccidi il soldato","Uccidi il soldato"];
   player setCurrentTask tskobj_1;
 };
 case EAST: {};
 case RESISTANCE: {};
 case CIVILIAN: {};
};

If you have only players on the west side you can remove the case at all and just use:

waitUntil {!(isNull player)};
waitUntil {player==player};

player createDiaryRecord ["Diary",["Promemoria","Puoi uccidere il soldato come preferisci."]];
tskobj_1=player createSimpleTask ["Uccidi il soldato"];
tskobj_1 setSimpleTaskDescription ["Devi uccidere il soldato vicino a te per vedere se funziona il file briefing.","Uccidi il soldato","Uccidi il soldato"];
player setCurrentTask tskobj_1;

Like said there is no need to have a briefing.sqf, just place all in the init.sqf

Share this post


Link to post
Share on other sites
This in the init.sqf works just fine here:

waitUntil {!(isNull player)};
waitUntil {player==player};

switch (side player) do
{
 case WEST:
 {
   player createDiaryRecord ["Diary",["Promemoria","Puoi uccidere il soldato come preferisci."]];
   tskobj_1=player createSimpleTask ["Uccidi il soldato"];
   tskobj_1 setSimpleTaskDescription ["Devi uccidere il soldato vicino a te per vedere se funziona il file briefing.","Uccidi il soldato","Uccidi il soldato"];
   player setCurrentTask tskobj_1;
 };
 case EAST: {};
 case RESISTANCE: {};
 case CIVILIAN: {};
};

If you have only players on the west side you can remove the case at all and just use:

waitUntil {!(isNull player)};
waitUntil {player==player};

player createDiaryRecord ["Diary",["Promemoria","Puoi uccidere il soldato come preferisci."]];
tskobj_1=player createSimpleTask ["Uccidi il soldato"];
tskobj_1 setSimpleTaskDescription ["Devi uccidere il soldato vicino a te per vedere se funziona il file briefing.","Uccidi il soldato","Uccidi il soldato"];
player setCurrentTask tskobj_1;

Like said there is no need to have a briefing.sqf, just place all in the init.sqf

No offense but this is horrible advice.

To the OP, call the briefing like this:

if (!(isNull player)) then  //non-JIP player
{
[] execVM "briefing.sqf";
};

if (!isServer && isNull player) then  //JIP player
{
waitUntil {!isNull player};

[] execVM "briefing.sqf";

};

Share this post


Link to post
Share on other sites

All he needs to do is to fix the damn quote marks.

Wolle, putting briefing commands into init.sqf works, but I wouldn't start recommending that method to people. Tyrspawn, no need to complicate the calling, he waituntils for player inside briefing.sqf.

Share this post


Link to post
Share on other sites
Ehr...forgive me tyrspawn, but what do you mean with OP? :D

OP stands for "Opening Poster", the one who started the thread....in this case: you. ;)

Share this post


Link to post
Share on other sites
OP stands for "Opening Poster", the one who started the thread....in this case: you. ;)

:D oh, great! :rolleyes:

However, thanks you all guys, I think it was as shk said! In fact I wrote the text for the init.sqf on Word, then I copied it on the file, and the quotation marks were in different type of letter. Now it works, thanks! I only have a doubt: how can I make the text appear as the mission begin? I have only to edit the description.ext?

Share this post


Link to post
Share on other sites

What do you mean "appear as the mission begins"? You're using commands that place the text in the notes section in your map and are available at the briefing stage as well as during the mission in that seciton. If you want to show text elsewhere, you need to use the appropriate command, but I can't tell you which because I have no idea what you actually are trying to do.

Share this post


Link to post
Share on other sites

I mean: when a mission begin, usually it's immediately visible the map. Then you press "Continue" and the mission begin. Just as in the campaign's missions. Instead in my mission, I don't automatically see the map at the begin.

Share this post


Link to post
Share on other sites

Guess they made it with the command "openMap" at the beginning of a mission.

openMap [True, False];

Wiki: openMap

Share this post


Link to post
Share on other sites

Are you clicking "preview" in the single player editor? As that's the only way I know that "skips" the briefing stage. Campaign missions, scenarios, MP editor missions, MP hosted missions and MP missions on a dedicated server will always start at the briefing screen as far as I know.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×