Jump to content
Sign in to follow this  
Swedda

only leader see notes and objectives.

Recommended Posts

noticed something wierd with my mission, only the leader see the notes and objectives.

my briefing.sqf looks like this

player createDiaryRecord ["Diary", ["Protect the colonel.", "U are one i a team of 10 who's task is to protect colonel scott, he is of great importance of this war and he's death would mean the end for all of us. If u complete this task u will be given new missions."]];


tskobj_3 = player createSimpleTask["Destroy aircraft"];
tskobj_3 setSimpleTaskDescription ["Get to the airfield just north of balota and take out their plane located in the hangars, it will be heavily guarded so procced with caution.", "Attack Airfield", "Attack Airfield"];
tskobj_3 setSimpleTaskDestination (getMarkerPos "marker3");


tskobj_2 = player createSimpleTask["Attack Msta"];
tskobj_2 setSimpleTaskDescription ["Time for some payback, destroy the town! If u want the second cobra unlocked find and destroy the small factory south of Msta", "Attack Msta", "Attack Msta"];
tskobj_2 setSimpleTaskDestination (getMarkerPos "marker2");


tskobj_1 = player createSimpleTask["Protect the colonel"];
tskobj_1 setSimpleTaskDescription ["You have to protect colonel Scott from beeing killed.", "Protect the colonel", "Protect the colonel"];
tskobj_1 setSimpleTaskDestination (getMarkerPos "marker1");

why is that ??

Share this post


Link to post
Share on other sites

forgott to set gametype in description, that seemed to solve it.

---------- Post added at 11:16 AM ---------- Previous post was at 10:00 AM ----------

seemed, wrong. wtf... So if players join before mission or started all is ok, but if some1 dissconnects and reconnect task list and note's disapear.

ideas ??

Share this post


Link to post
Share on other sites

sorry but i cant see any solution for my issue there ?? i dont use an intro so thats shouldnt affect anything. beeing a noob and all i most certain are wrong :) so please explain to me. im trying to learn here

Share this post


Link to post
Share on other sites
if players join before mission started all is ok, but if someone dissconnects and reconnect task list and note's disapear

That's most likely because they are JIP (=Join In Progress). When a JIP joins the game there will be a brief moment before he is actually registered as a player by the network. He is considered to be isNull rather than player. It just so happens that your Diary Records and Simple tasks are created during that time. Hence no entries for JIP's. In other words player cannot createDiaryRecord because there is no player on the JIP's computer yet. One solution may be to start the init.sqf with the following line (ad hoc code)

if ((not isDedicated) and (isNull player)) then 

{
waitUntil {not(isNull player)};
};

player createDiaryRecord ["Diary", ["Protect the colonel.", "U are one i a team of 10 who's task is to protect colonel scott, he is of great importance of this war and he's death would mean the end for all of us. If u complete this task u will be given new missions."]];


tskobj_3 = player createSimpleTask["Destroy aircraft"];
tskobj_3 setSimpleTaskDescription ["Get to the airfield just north of balota and take out their plane located in the hangars, it will be heavily guarded so procced with caution.", "Attack Airfield", "Attack Airfield"];
tskobj_3 setSimpleTaskDestination (getMarkerPos "marker3");


tskobj_2 = player createSimpleTask["Attack Msta"];
tskobj_2 setSimpleTaskDescription ["Time for some payback, destroy the town! If u want the second cobra unlocked find and destroy the small factory south of Msta", "Attack Msta", "Attack Msta"];
tskobj_2 setSimpleTaskDestination (getMarkerPos "marker2");


tskobj_1 = player createSimpleTask["Protect the colonel"];
tskobj_1 setSimpleTaskDescription ["You have to protect colonel Scott from beeing killed.", "Protect the colonel", "Protect the colonel"];
tskobj_1 setSimpleTaskDestination (getMarkerPos "marker1");

Or words to that effect. You better double check the syntax because I'm writing this straight from memory and might have missed a semicolon or two. What the scripts does is to check if the client is a JIP, and if so, it wait's until they are not JIP's anymore. And at the same time it also checks if the client was a player from start, in wich case he should have the briefing without any delay at all. Thus players who joined before the game begun will be able to read the briefing while they are waiting in the lobby.

Lycka till. Hoppas det hjälpte dig

Edited by nominesine

Share this post


Link to post
Share on other sites

Ty very much. also found something else that im trying out at the moment.

if ( (!isServer) && (player != player) ) then
{
   waitUntil {player == player};
   waitUntil {time > 10};

};

ps. tror det hjälpte mig att förstå.

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  

×