Jump to content
Sign in to follow this  
SovietReign

Briefing Problem

Recommended Posts

Hey guys, I recently got into making missions in Arma and I've run into a little issue. I made a briefing.sqf and put in the following code.

waitUntil 
{ !isNil {player} };
waitUntil { player == player };

player createDiaryRecord ["Diary", ["From Voxel", "this is showing up in briefing as opposed to being under "notes""]]; 



//Objective 1

tskObj_1 = player createSimpleTask ["Clear Agia Marina"];
tskObj_1 setSimpleTaskDescription ["Neutralize all enemy forces in Agia Marina in order to re-establish supply routes.", "Clear Agia Marina", "Clear Out"];
tskObj_1 setSimpleTaskDestination (getMarkerPos "mkrObj1");

//Objective 2

tskObj_2 = player createSimpleTask ["Sabotage Helo"];
tskObj_2 setSimpleTaskDescription ["Enemy forces are preparing a proto-type helicopter for its first flight - don't let that happen.", "Sabotage Helo", "Sabotage"];
tskObj_2 setSimpleTaskDestination (getMarkerPos "mkrObj2");

//Objective 3

tskObj_3 = player createSimpleTask ["Eliminate Officer"];
tskObj_3 setSimpleTaskDescription ["An OPFOR officer is meeting with a troop today. Make sure he dosn't come back from that meeting.", "Eliminate Officer", "Meeting"];
tskObj_3 setSimpleTaskDestination (getMarkerPos "mkrObj3");

switch (side player) do 
{

case WEST: // BLUFOR briefing goes here
{
	This text wont show up
};


case EAST: // REDFOR briefing goes here
{	
};


case RESISTANCE: // RESISTANCE/INDEPENDENT briefing goes here
{


};


case CIVILIAN: // CIVILIAN briefing goes here
{


};
};

My problem is that the code under "Case West" doesn't show up at all in the briefing tab. Instead the code from addDiaryRecord shows up in the briefing tab as opposed to having the usual "Notes" tab. Everything else you see works flawlessly.

Thanks for any responses.

Share this post


Link to post
Share on other sites

hint "this text wont show up";

Here is what it should look like:

/*
 *	Mikey's Briefing Template v0.03
 *
 *
 *	Notes: 
 *		- Use the tsk prefix for any tasks you add. This way you know what the varname is for by just looking at it, and 
 *			aids you in preventing using duplicate variable names.
 *
 *
 *		Required briefing commands:		
 *		- Create Note:			player createDiaryRecord ["Diary", ["*The Note Title*", "*The Note Message*"]]; 
 *		- Create Task:			tskExample = player createSimpleTask ["*The Task Title*"];
 *		- Set Task Description:	tskExample setSimpleTaskDescription ["*Task Message*", "*Task Title*", "*Task HUD Title*"];
 *
 *		Optional briefing commands:
 * 		- Set Task Destination:	tskExample setSimpleTaskDestination (getMarkerPos "mkrObj1");  // use an existing marker!
 *		- Set the Current Task:	player setCurrentTask tskExample;
 *		
 *		Formatting:
 *		- To add a newline: 		<br/>
 *		- To add a marker link:	<marker name='mkrObj1'>Attack this area!!!</marker>
 *		- To add an image: 		<img image='somePic.jpg'/> 
 *		   - custom width/height:	<img image='somePic.jpg' width='200' height='200'/>
 *		
 *		Commands to use in-game:
 *		- Set Task State:		tskExample setTaskState "SUCCEEDED";   // states: "SUCCEEDED"  "FAILED"  "CANCELED" "CREATED"
 *		- Get Task State:		taskState tskExample;
 *		- Get Task Description:	taskDescription tskExample;   // returns the *task title* as a string
 *		- Show Task Hint:		[tskExample] call mk_fTaskHint;  // make sure tskExample and the mk_fTaskHint function exist
 *							
 *
 *	Authors: Jinef & mikey
 */

// since we're working with the player object here, make sure it exists
waitUntil { !isNull player }; // all hip now ;-)
waitUntil { player == player };



switch (side player) do 
{

case WEST: // BLUFOR briefing goes here
{
	player createDiaryRecord["Diary", ["Info", "<br/>Author - mikey<br/>Version 0.03<br/>"]];
	player createDiaryRecord["Diary", ["Enemy forces", "<br/>Enemy forces are expected to be running to the same <marker name='mkrFlagpole'>flagpole</marker> as us, so stay frosty!"]];
	player createDiaryRecord["Diary", ["Friendly forces", "<br/>Our fireteam will start on the western edge of the airfield."]];
	player createDiaryRecord["Diary", ["Mission", "<br/>Our fireteam has to reach the <marker name='mkrFlagpole'>flagpole</marker> first."]];
	player createDiaryRecord["Diary", ["Situation", "<br/>Never play truth or dare while drunk. You will only end up with silly dares involving live ammunition and long distances to run."]];



	// Secondary Objective
	tskWestObj2 = player createSimpleTask["Secondary: Stay Alive"]; 
	tskWestObj2 setSimpleTaskDescription["Let's not take any risks. It's not worth going home in a box for this. Stay frosty!", "Avoid Casualties", "Avoid Casualties"];
	//>---------------------------------------------------------<
	// Primary Objective
	tskWestObj1 = player createSimpleTask["Primary: Get to the flag first"]; 
	tskWestObj1 setSimpleTaskDescription["Your fireteam starts <marker name='mkrWestStart'>here</marker>. Your task is to secure the <marker name='mkrFlagpole'>flagpole</marker> first.", "Secure The Flagpole", "Secure The Flagpole"];
	tskWestObj1 setSimpleTaskDestination (getMarkerPos "mkrFlagpole");
	player setCurrentTask tskWestObj1;
};


case EAST: // REDFOR briefing goes here
{

	player createDiaryRecord["Diary", ["Info", "<br/>Author - mikey<br/>Version 0.03<br/>"]];
	player createDiaryRecord["Diary", ["Enemy forces", "<br/>Enemy forces are expected to be running to the same <marker name='mkrFlagpole'>flagpole</marker> as us, so charge it soviet style!"]];
	player createDiaryRecord["Diary", ["Friendly forces", "<br/>Our fireteam will start on the eastern edge of the airfield."]];
	player createDiaryRecord["Diary", ["Mission", "<br/>Our fireteam has to reach the <marker name='mkrFlagpole'>flagpole</marker> first."]];
	player createDiaryRecord["Diary", ["Situation", "<br/>Never play truth or dare while drunk. You will only end up with silly dares involving live ammunition and long distances to run."]];



	// Secondary Objective
	tskEastObj2 = player createSimpleTask["Secondary: Stay Alive"]; 
	tskEastObj2 setSimpleTaskDescription["Let's not take any risks. It's not worth going home in a box for this. Stay frosty!", "Avoid Casualties", "Avoid Casualties"];
	//>---------------------------------------------------------<
	// Primary Objective
	tskEastObj1 = player createSimpleTask["Primary: Get to the flag first"]; 
	tskEastObj1 setSimpleTaskDescription["Your fireteam starts <marker name='mkrEastStart'>here</marker>. Your task is to secure the <marker name='mkrFlagpole'>flagpole</marker> first.", "Secure The Flagpole", "Secure The Flagpole"];
	tskEastObj1 setSimpleTaskDestination (getMarkerPos "mkrFlagpole");
	player setCurrentTask tskEastObj1;

};


case RESISTANCE: // RESISTANCE/INDEPENDENT briefing goes here
{


};


case CIVILIAN: // CIVILIAN briefing goes here
{
	player createDiaryRecord["Diary", ["Info", "<br/>Author - mikey<br/>Version 0.03<br/>"]];
	player createDiaryRecord["Diary", ["Situation", "<br/>We're gonna watch some silly stuff happen today."]];

};
};

Edited by cobra4v320

Share this post


Link to post
Share on other sites
hint "this text wont show up";

Here is what it should look like:

/*
 *	Mikey's Briefing Template v0.03
 *
 *
 *	Notes: 
 *		- Use the tsk prefix for any tasks you add. This way you know what the varname is for by just looking at it, and 
 *			aids you in preventing using duplicate variable names.
 *
 *
 *		Required briefing commands:		
 *		- Create Note:			player createDiaryRecord ["Diary", ["*The Note Title*", "*The Note Message*"]]; 
 *		- Create Task:			tskExample = player createSimpleTask ["*The Task Title*"];
 *		- Set Task Description:	tskExample setSimpleTaskDescription ["*Task Message*", "*Task Title*", "*Task HUD Title*"];
 *
 *		Optional briefing commands:
 * 		- Set Task Destination:	tskExample setSimpleTaskDestination (getMarkerPos "mkrObj1");  // use an existing marker!
 *		- Set the Current Task:	player setCurrentTask tskExample;
 *		
 *		Formatting:
 *		- To add a newline: 		<br/>
 *		- To add a marker link:	<marker name='mkrObj1'>Attack this area!!!</marker>
 *		- To add an image: 		<img image='somePic.jpg'/> 
 *		   - custom width/height:	<img image='somePic.jpg' width='200' height='200'/>
 *		
 *		Commands to use in-game:
 *		- Set Task State:		tskExample setTaskState "SUCCEEDED";   // states: "SUCCEEDED"  "FAILED"  "CANCELED" "CREATED"
 *		- Get Task State:		taskState tskExample;
 *		- Get Task Description:	taskDescription tskExample;   // returns the *task title* as a string
 *		- Show Task Hint:		[tskExample] call mk_fTaskHint;  // make sure tskExample and the mk_fTaskHint function exist
 *							
 *
 *	Authors: Jinef & mikey
 */

// since we're working with the player object here, make sure it exists
waitUntil { !isNull player }; // all hip now ;-)
waitUntil { player == player };



switch (side player) do 
{

case WEST: // BLUFOR briefing goes here
{
	player createDiaryRecord["Diary", ["Info", "<br/>Author - mikey<br/>Version 0.03<br/>"]];
	player createDiaryRecord["Diary", ["Enemy forces", "<br/>Enemy forces are expected to be running to the same <marker name='mkrFlagpole'>flagpole</marker> as us, so stay frosty!"]];
	player createDiaryRecord["Diary", ["Friendly forces", "<br/>Our fireteam will start on the western edge of the airfield."]];
	player createDiaryRecord["Diary", ["Mission", "<br/>Our fireteam has to reach the <marker name='mkrFlagpole'>flagpole</marker> first."]];
	player createDiaryRecord["Diary", ["Situation", "<br/>Never play truth or dare while drunk. You will only end up with silly dares involving live ammunition and long distances to run."]];



	// Secondary Objective
	tskWestObj2 = player createSimpleTask["Secondary: Stay Alive"]; 
	tskWestObj2 setSimpleTaskDescription["Let's not take any risks. It's not worth going home in a box for this. Stay frosty!", "Avoid Casualties", "Avoid Casualties"];
	//>---------------------------------------------------------<
	// Primary Objective
	tskWestObj1 = player createSimpleTask["Primary: Get to the flag first"]; 
	tskWestObj1 setSimpleTaskDescription["Your fireteam starts <marker name='mkrWestStart'>here</marker>. Your task is to secure the <marker name='mkrFlagpole'>flagpole</marker> first.", "Secure The Flagpole", "Secure The Flagpole"];
	tskWestObj1 setSimpleTaskDestination (getMarkerPos "mkrFlagpole");
	player setCurrentTask tskWestObj1;
};


case EAST: // REDFOR briefing goes here
{

	player createDiaryRecord["Diary", ["Info", "<br/>Author - mikey<br/>Version 0.03<br/>"]];
	player createDiaryRecord["Diary", ["Enemy forces", "<br/>Enemy forces are expected to be running to the same <marker name='mkrFlagpole'>flagpole</marker> as us, so charge it soviet style!"]];
	player createDiaryRecord["Diary", ["Friendly forces", "<br/>Our fireteam will start on the eastern edge of the airfield."]];
	player createDiaryRecord["Diary", ["Mission", "<br/>Our fireteam has to reach the <marker name='mkrFlagpole'>flagpole</marker> first."]];
	player createDiaryRecord["Diary", ["Situation", "<br/>Never play truth or dare while drunk. You will only end up with silly dares involving live ammunition and long distances to run."]];



	// Secondary Objective
	tskEastObj2 = player createSimpleTask["Secondary: Stay Alive"]; 
	tskEastObj2 setSimpleTaskDescription["Let's not take any risks. It's not worth going home in a box for this. Stay frosty!", "Avoid Casualties", "Avoid Casualties"];
	//>---------------------------------------------------------<
	// Primary Objective
	tskEastObj1 = player createSimpleTask["Primary: Get to the flag first"]; 
	tskEastObj1 setSimpleTaskDescription["Your fireteam starts <marker name='mkrEastStart'>here</marker>. Your task is to secure the <marker name='mkrFlagpole'>flagpole</marker> first.", "Secure The Flagpole", "Secure The Flagpole"];
	tskEastObj1 setSimpleTaskDestination (getMarkerPos "mkrFlagpole");
	player setCurrentTask tskEastObj1;

};


case RESISTANCE: // RESISTANCE/INDEPENDENT briefing goes here
{


};


case CIVILIAN: // CIVILIAN briefing goes here
{
	player createDiaryRecord["Diary", ["Info", "<br/>Author - mikey<br/>Version 0.03<br/>"]];
	player createDiaryRecord["Diary", ["Situation", "<br/>We're gonna watch some silly stuff happen today."]];

};
};

I changed it to this

waitUntil { !isNil {player} };
waitUntil { player == player };






switch (side player) do 
{

case WEST: // BLUFOR briefing goes here
{
    player createDiaryRecord ["Diary", ["From Voxel", "Y u no work?"]]; 

              player createDiaryRecord ["Diary", ["Blueprints", "We have some attack helicopters, however we are unable to use them until we retreive the blueprints.
              <br/> <br/>We have intel on the suspected location of the blueprints. If you retrive them, we just might be able to put those helicopters to use.<br/> <br/>Good Luck."]]; 

                  player createDiaryRecord ["Diary", ["Landmines", "Intel shows that there are active landmines in the area. Our guys were able to mark the locations of the minefields on the map.
                  <br/> <br/>Each minefield has approximately 50 mines, but it would be in your best interests to avoid these areas all together."]]; 
			   //Objective 1

tskObj_1 = player createSimpleTask ["Clear Agia Marina"];
tskObj_1 setSimpleTaskDescription ["Neutralize all enemy forces in Agia Marina in order to re-establish supply routes.", "Clear Agia Marina", "Clear Out"];
tskObj_1 setSimpleTaskDestination (getMarkerPos "mkrObj1");

//Objective 2

tskObj_2 = player createSimpleTask ["Sabotage Helo"];
tskObj_2 setSimpleTaskDescription ["Enemy forces are preparing a proto-type helicopter for its first flight - don't let that happen.", "Sabotage Helo", "Sabotage"];
tskObj_2 setSimpleTaskDestination (getMarkerPos "mkrObj2");

//Objective 3

tskObj_3 = player createSimpleTask ["Eliminate Officer"];
tskObj_3 setSimpleTaskDescription ["An OPFOR officer is meeting with a troop today. Make sure he dosn't come back from that meeting.", "Eliminate Officer", "Meeting"];
tskObj_3 setSimpleTaskDestination (getMarkerPos "mkrObj3");



};


case EAST: // REDFOR briefing goes here
{	
};


case RESISTANCE: // RESISTANCE/INDEPENDENT briefing goes here
{


};


case CIVILIAN: // CIVILIAN briefing goes here
{


};
};

Still having the same issue :(

Share this post


Link to post
Share on other sites

This works, just tested.

waitUntil {!isNull player && isPlayer player};

switch (side player) do 
{
case WEST:
{
        player createDiaryRecord ["Diary", ["From Voxel", "Y u no work?"]];
	player createDiaryRecord ["Diary", ["Blueprints", "We have some attack helicopters, however we are unable to use them until we retreive the blueprints. <br/> <br/>We have intel on the suspected location of the blueprints. If you retrive them, we just might be able to put those helicopters to use.<br/> <br/>Good Luck."]]; 
	player createDiaryRecord ["Diary", ["Landmines", "Intel shows that there are active landmines in the area. Our guys were able to mark the locations of the minefields on the map.<br/> <br/>Each minefield has approximately 50 mines, but it would be in your best interests to avoid these areas all together."]]; 

	//Objective 1
	tskObj_1 = player createSimpleTask ["Clear Agia Marina"];
	tskObj_1 setSimpleTaskDescription ["Neutralize all enemy forces in Agia Marina in order to re-establish supply routes.", "Clear Agia Marina", "Clear Out"];
	tskObj_1 setSimpleTaskDestination (getMarkerPos "mkrObj1");

	//Objective 2

	tskObj_2 = player createSimpleTask ["Sabotage Helo"];
	tskObj_2 setSimpleTaskDescription ["Enemy forces are preparing a proto-type helicopter for its first flight - don't let that happen.", "Sabotage Helo", "Sabotage"];
	tskObj_2 setSimpleTaskDestination (getMarkerPos "mkrObj2");

	//Objective 3
	tskObj_3 = player createSimpleTask ["Eliminate Officer"];
	tskObj_3 setSimpleTaskDescription ["An OPFOR officer is meeting with a troop today. Make sure he dosn't come back from that meeting.", "Eliminate Officer", "Meeting"];
	tskObj_3 setSimpleTaskDestination (getMarkerPos "mkrObj3");
};
};

Share this post


Link to post
Share on other sites
This works, just tested.

waitUntil {!isNull player && isPlayer player};

switch (side player) do 
{
case WEST:
{
        player createDiaryRecord ["Diary", ["From Voxel", "Y u no work?"]];
	player createDiaryRecord ["Diary", ["Blueprints", "We have some attack helicopters, however we are unable to use them until we retreive the blueprints. <br/> <br/>We have intel on the suspected location of the blueprints. If you retrive them, we just might be able to put those helicopters to use.<br/> <br/>Good Luck."]]; 
	player createDiaryRecord ["Diary", ["Landmines", "Intel shows that there are active landmines in the area. Our guys were able to mark the locations of the minefields on the map.<br/> <br/>Each minefield has approximately 50 mines, but it would be in your best interests to avoid these areas all together."]]; 

	//Objective 1
	tskObj_1 = player createSimpleTask ["Clear Agia Marina"];
	tskObj_1 setSimpleTaskDescription ["Neutralize all enemy forces in Agia Marina in order to re-establish supply routes.", "Clear Agia Marina", "Clear Out"];
	tskObj_1 setSimpleTaskDestination (getMarkerPos "mkrObj1");

	//Objective 2

	tskObj_2 = player createSimpleTask ["Sabotage Helo"];
	tskObj_2 setSimpleTaskDescription ["Enemy forces are preparing a proto-type helicopter for its first flight - don't let that happen.", "Sabotage Helo", "Sabotage"];
	tskObj_2 setSimpleTaskDestination (getMarkerPos "mkrObj2");

	//Objective 3
	tskObj_3 = player createSimpleTask ["Eliminate Officer"];
	tskObj_3 setSimpleTaskDescription ["An OPFOR officer is meeting with a troop today. Make sure he dosn't come back from that meeting.", "Eliminate Officer", "Meeting"];
	tskObj_3 setSimpleTaskDestination (getMarkerPos "mkrObj3");
};
};

It works, but the problem is that there isn't the usual "Notes" tab when you open the map, It just shows the notes when I click briefing.

Share this post


Link to post
Share on other sites

You can create your own menu item and then add items to it, if that helps, rather than just adding to the default Diary.

player createDiarySubject ["myPage","My page"];
player createDiaryRecord ["myPage", ["new", "Enemy base is on grid"]];

Share this post


Link to post
Share on other sites

Hello, I hope you don't mind if I post my own problem here (no double post). I wrote 3 different tasks in my briefing but only the 2 first are showed in-game (doesn't matter which one is first or last, it's always the same result).

waitUntil {!isNull player && isPlayer player};

// ----- Notes -----
player createDiaryRecord ["Diary", [
"Renseignements",
"Nous savons de source sure qu'en detruisant la <marker name='obj1'>tour radio</marker>, l'ennmi sera dans l'impossibilite de communiquer ou d'appeler des renforts.
<br/>Faites très attention lors de votre approche en vue de sa destruction."
]];
player createDiaryRecord ["Diary", [
"Civil",
"On nous signale que des civils sont toujours en <marker name='ville'>ville</marker>, evitez tout dommage collaterale.<br/><br/>"
]];

// ----- Objectifs -----

//Objective 1
obj1 = player createSimpleTask["Destroy the radio tower"];
obj1 setSimpleTaskDescription["Destroy the radio tower <br/><br/> Vous devez impérativement détruire la <marker name='obj1'>tour radio</marker>. Ceci évitera l'arriver de renforts ennemis.", "Destroy the radio tower", "Destroy the radio tower"];
obj1 setSimpleTaskDestination (getMarkerPos "obj1");

//Objective 2
obj2 = player createSimpleTask["Destroy all armoured vehicle"];
obj2 setSimpleTaskDescription["Destroy all armoured vehicle <br/><br/> Prendre d'assaut la <marker name='obj2'>base</marker> et detruire tous les Ifrits. Utilisez les charges explosives pour les detruire, deux suffisent.", "Destroy all armoured vehicle", "Destroy all armoured vehicle"];
obj2 setSimpleTaskDestination (getMarkerPos "obj2");

//Objective 3 [i][color="#FF0000"]This one doesn't appear in the game briefing[/color][/i]
obj3 = player createSimpleTask["Destroy the mortar"];
obj3 setSimpleTaskDescription["Destroy the mortar <br/><br/> Les mortiers ont ete localises dans le <marker name='obj3'>campement avance</marker>.", "Destroy the mortar", "Destroy the mortar"];
obj3 setSimpleTaskDestination (getMarkerPos "obj3");

Thanks in advance.

Edit: I invert Objective 2 & 3 and now it's working, I really don't get it :)

Thanks for your help.

Edited by Papanowel
It's working

Share this post


Link to post
Share on other sites

@ Papanowel

That briefing works fine for me. I copied and pasted exactly as you have written above into a new mission, all Diary records and all task show up fine.

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  

×