Jump to content
Sign in to follow this  
icfhoop

Small Question ( I hope)

Recommended Posts

Hello all, and before I go anywhere I have searched this forum and have found nothing specifically on this matter so I thought I might as well ask. I have searched just to make it clear but I am still getting used to doing the new style of briefings.

So down to business, I downloaded that tool that creates briefings easier and made a briefing for my mission so here its:

// A2BM W    100
// DO NOT EDIT THIS FILE

waitUntil {!(isNull player)};
waitUntil {player==player};
switch (side player) do
{
case WEST:
{
player createDiaryRecord ["Diary",["Russian Intelligence Officer","A major in the CDF was ambushed by a squad of Spetsnaz on his way to a small airstrip in the northern area.  He was captured and taken to a warehouse where they tortured and questioned him.  He was killed only after he spilled the identity of a CIA agent in deep cover with the ChDKZ brass.  We must locate and kill the Russian Intel. Officer before he lets the ChDKZ know about the CIA agent."]];
player createDiaryRecord ["Diary",["Mortar Battery ","The mortar pits are located in a small ruined village <marker name='mortars'>here</marker>.  It is believed that there maybe a platoon sized element of insurgents there, but it is unknown for a fact."]];
player createDiaryRecord ["Diary",["Mogilevka","A column of M1A2 Abrams callsign "Warpig" have been stopped on the outskirts of Mogilevka.  Mortar fire and contiuned harassment from local insurgent groups have put a beating on Warpig.  "]];
player createDiaryRecord ["Diary",["Operation Cabin Boy","5 days after the U.S. Marines landed on the southern beaches of Chernarus, they have moved almost 25km inland.  After taking key towns, the next objective was to take Gorka.  Gorka is suspected of housing and giving care to Lopotev and his officers.  Once the Marines enter Gorka, this war may end.<br/><br/>"]];
tskObj1=player createSimpleTask ["Kill the Russian Intelligence Officer."];
tskObj1 setSimpleTaskDescription ["Sack his ass.","Kill the Russian Intelligence Officer.","Kill the Russian Intelligence Officer."];
tskObj0=player createSimpleTask ["Eliminate Mortar Threat"];
tskObj0 setSimpleTaskDescription ["Clear out enemies in the mortar pits.","Eliminate Mortar Threat","Eliminate Mortar Threat"];
player setCurrentTask tskObj0;
};
case EAST:
{
};
case RESISTANCE:
{
};
case CIVILIAN:
{
};
};
if (isNil {player getVariable "mk_briefingEH"}) then
{
player addEventHandler ["killed",{[] spawn {waitUntil {alive player};execVM"briefing.sqf";};}];
player setVariable ["mk_briefingEH",true];
};efingEH",true];
};

and my init.sqf looks like this:

execVM "briefing.sqf";

But this doesnt show in my mission even when I preview in MP. Any help is appreciated

Share this post


Link to post
Share on other sites

That tool seems to be a bit buggy. Below code should work:

waitUntil {!(isNull player)};
waitUntil {player==player};
switch (side player) do
{
 case WEST:
 {
   player createDiaryRecord ["Diary",["Russian Intelligence Officer","A major in the CDF was ambushed by a squad of Spetsnaz on his way to a small airstrip in the northern area.  He was captured and taken to a warehouse where they tortured and questioned him.  He was killed only after he spilled the identity of a CIA agent in deep cover with the ChDKZ brass.  We must locate and kill the Russian Intel. Officer before he lets the ChDKZ know about the CIA agent."]];
   player createDiaryRecord ["Diary",["Mortar Battery ","The mortar pits are located in a small ruined village <marker name='mortars'>here</marker>.  It is believed that there maybe a platoon sized element of insurgents there, but it is unknown for a fact."]];
   player createDiaryRecord ["Diary",["Mogilevka","A column of M1A2 Abrams callsign 'Warpig' have been stopped on the outskirts of Mogilevka. Mortar fire and contiuned harassment from local insurgent groups have put a beating on Warpig."]];
   player createDiaryRecord ["Diary",["Operation Cabin Boy","5 days after the U.S. Marines landed on the southern beaches of Chernarus, they have moved almost 25km inland.  After taking key towns, the next objective was to take Gorka.  Gorka is suspected of housing and giving care to Lopotev and his officers.  Once the Marines enter Gorka, this war may end.<br/><br/>"]];
   tskObj1=player createSimpleTask ["Kill the Russian Intelligence Officer."];
   tskObj1 setSimpleTaskDescription ["Sack his ass.","Kill the Russian Intelligence Officer.","Kill the Russian Intelligence Officer."];
   tskObj0=player createSimpleTask ["Eliminate Mortar Threat"];
   tskObj0 setSimpleTaskDescription ["Clear out enemies in the mortar pits.","Eliminate Mortar Threat","Eliminate Mortar Threat"];
   player setCurrentTask tskObj0;
 };
 case EAST:
 {
 };
 case RESISTANCE:
 {
 };
 case CIVILIAN:
 {
 };
};
if (isNil {player getVariable "mk_briefingEH"}) then
{
 player addEventHandler ["killed",{[] spawn {waitUntil {alive player};execVM"briefing.sqf";};}];
 player setVariable ["mk_briefingEH",true];
};

The first problem was in the "Mogilevka" diary line (line 12). Warpig must be in a single (') not double (") quotation marks.

The second problem was in line 34 of your script:

};efingEH",true];

Share this post


Link to post
Share on other sites

I am sure you dont need the event handler any more to execute the briefing again.

Share this post


Link to post
Share on other sites

Yes, after 1.03 you don't lose briefing any longer after respawn. If you do use something to readd briefings you end up with duplicated tasks and notes. :)

Share this post


Link to post
Share on other sites

Thanks you all for your help, I personally are not using 1.03 makes things worse for me, but thanks for the help!

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  

×