Jump to content
Sign in to follow this  
{USI}_Zombie

Deathmatch and briefing

Recommended Posts

I have not been able to get the briefing.sqf to work for a deathmatch. I think it is because everyone is side "enemy" and there is no place in the briefing for side enemy. Anyone found a solution to this? Here is the template I use: I even tried changing west to enemy and got an error.

/*
 *	Mikey's Briefing Template v0.02
 *   change the name to briefing.sqf to use in your mission...added by {USI}_Zombie/{USI} Studios
 *
 *	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 - Jinef<br/>Version 1.00<br/>"]];
	player createDiaryRecord["Diary", ["Enemy forces", "<br/>Enemy forces are expected to consist of lightly armed locals mixed with trained regulars of the enemy. There are regular army aviation support and defence troops stationed at the airfield however after preliminary air strikes white flags have been seen, so we expect little resistance."]];
	player createDiaryRecord["Diary", ["Friendly forces", "<br/>1st Platoon will be deployed on the north flank. 2nd Platoon will capture the high ground overlooking the airfield. 3rd platoon will conduct the assault on the airfield.<br/><br/>Due to a risk of mines the first phase of the operation will be conducted dismounted only, the AAVs will hold the beach."]];
	player createDiaryRecord["Diary", ["Mission", "<br/>1st Platoon is to secure the northen flank of the island. This will be achieved by Alpha squad securing the town of Kamenyy, with Bravo and Charlie squads provding flank cover. Alpha squad will not proceed further than the limits of advance marked on your maps. 81mm mortar support is on call, however collateral damage is to be avoided at all costs."]];
	player createDiaryRecord["Diary", ["Situation", "<br/><img image='pic.jpg' width='200' height='200'/><br/><br/>Prior to our landing on the main island of Chernarus, our marine task force will secure the airfield on the small island of Utes. Our company will be performing the assault with support from the MEU task force units. The island is expected to be defended only very lightly by enemy forces with support from an disgruntled population. The key to our success is to quickly assert control over the island while maintaining civilian infrastructure and dignity."]];


	// Secondary Objective
	tskObj3 = player createSimpleTask["Secondary: Avoid Civilian Casualties"]; 
	tskObj3 setSimpleTaskDescription["The civilians here are relying on us to restore order and let them return to a peaceful life, we can't just blast our way through.", "Avoid Civilian Casualties", "Avoid Civilian Casualties"];			
	//>---------------------------------------------------------<
	// Secondary Objective
	tskObj2 = player createSimpleTask["Secondary: Avoid Friendly Casualties"]; 
	tskObj2 setSimpleTaskDescription["Let's not take any risks. It's not worth going home in a box for this. Stay frosty!", "Avoid Friendly Casualties", "Avoid Friendly Casualties"];
	//>---------------------------------------------------------<
	// Primary Objective
	tskObj1 = player createSimpleTask["Primary: Secure The Town"]; 
	tskObj1 setSimpleTaskDescription["Your squad has just landed on the beach <marker name='BAlpha'>here</marker>. Your task is to secure <marker name='BObj1'>this</marker> town ahead of the main landing force to ensure safe passage for further combat echelons. Meanwhile Bravo and Charlie squads will secure the enemy compounds on the flank and endeavour to prevent enemy reinforcments reaching the town.", "Secure The Town", "Secure The Town"];
	player setCurrentTask tskObj1;
};


case EAST: // REDFOR briefing goes here
{


};


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


};


case CIVILIAN: // CIVILIAN briefing goes here
{


};
};



// run this file again when respawning (only setup the killed EH once though)
if ( isNil {player getVariable "mk_briefingEH"} ) then 
{
player addEventHandler ["killed", 
{ 
	[] spawn {
		waitUntil { alive player }; // waitUntil player has respawned
		execVM "briefing.sqf"; 		// make sure this path is correct
	};	
}];
player setVariable ["mk_briefingEH", true];
};

Share this post


Link to post
Share on other sites

1st of all, remove the last 10 lines. Executing the briefing when you respawn isn't necessary anymore on 1.03.

2nd, you don't really need that entire switch command, so you could remove it. You could also add the enemy side into it.

Just add this after the civilian case:

case ENEMY:
{

};

Share this post


Link to post
Share on other sites

fair enough, will give it a try

---------- Post added at 12:37 PM ---------- Previous post was at 11:56 AM ----------

I made the tweaks you suggested above, I am sure it will make my coops cleaner but adding case enemy didn't work for my DM. I depbo'd the default BIS deathmatch and found they didn't even use a briefing.sqf. They added this to the init.sqf:

_diary = player createDiaryRecord ["Diary", [localize "str_mpdeathmatch_briefing", localize "str_mpdeathmatch_briefing_text"]];

which I modified to

_diary = player createDiaryRecord["Diary", ["Info", "<br/>Author - Jinef<br/>Version 1.00  Map by USI Studios<br/>"]];
_diary = player createDiaryRecord["Diary", ["Enemy forces", "<br/>Everyone you see is an enemy."]];
_diary = player createDiaryRecord["Diary", ["Friendly forces", "<br/>There are no friendlies here, kill or be killed."]];
_diary = player createDiaryRecord["Diary", ["Mission", "<br/>Stay alive, kill everyone."]];

and now I get a briefing, in the notes tab when the mission starts.

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  

×