Jump to content

Recommended Posts

To be honest, I do assume that readers of this tutorial know at least how to make missions and/or sqf files (if you don't know how to, why would you wanna make a briefing in the first place?).

If you do want to learn those things, visit ofpec.

Share this post


Link to post
Share on other sites

Thank You! Now to just Un-PBO a few more files and I will be able to peel myself from MP and back to the good ol' editor.

Share this post


Link to post
Share on other sites
@imutep, try to set the task destination somewhere else. You could give it a bogus marker name for example, and the game engine will place the marker at [0,0]

Thx Mikey, that's it.

Share this post


Link to post
Share on other sites

I spent SOOOOOO long reading this thread trying to create a briefing. After many hours i finally made one, my problem was that i saved my notepad briefing.sqf, with the 'type' box set to '.txt. not 'all files'. So i hope that can help some other peoples problems out there.

However when i 'export to single missions' the scripts and briefing disappear. I have tried to put the init.sqf and briefing.sqf next to the PBO file in Bohemis Interactive>Arma 2>Missions, and it still isnt recognised. What do i do?

Share this post


Link to post
Share on other sites

Muzza,

You need to put those files into the mydocuments\arma2\missions\<yourmissionname> folder. Within this folder will be a mission.sqm file.

Then you can check it in the editor to see if its working, if it is export it to singleplayer missions.

Share this post


Link to post
Share on other sites

The only hitch i am currently having with the briefing and the tasks specifically, is that on respawn from death in MP, the taskstate isnt up to date. I'm using the Revive script, which succesfully loads the tasks and diary back into the map via the revie-init.sqf but it doesnt update the tasks if theyve been copmpleted.

Share this post


Link to post
Share on other sites
Thx Mikey, that's it.

Seams you got it to work...

Can you give a example ?

Share this post


Link to post
Share on other sites

No sorry, i don't get it to work. I thought it, but hmm....

Share this post


Link to post
Share on other sites

Ive made my own mission which i play with a couple of mates online, and i was just wondering how do i write my own mission briefings for it? Ive looked through FAQ's, but couldnt find anything on ArmA 2, just OFP.

Also can i write my own evidance files?

konyo

Share this post


Link to post
Share on other sites

This is an example of a briefing script, in ArmAII the briefings are no longer html, only debriefing is.

Here is an working example, look at it and change the text to your own mission.

To make the script work, paste the text in a notepad document that is named init and put .sqf as file type.

The notepad document should thus be called: init.sqf

Then place that document in your mission folder.

/*
 *	Unofficial Zeus Briefing Template v0.01
 *
 *
 *	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 varnames.
 *		- 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'/>
 *
 *		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 existing "empty marker" 
 *		- Set the Current Task:	player setCurrentTask tskExample;
 *		
 *		Commands to use in-game:
 *		- Set Task State:		tskExample setTaskState "SUCCEEDED";   // states: "SUCCEEDED"  "FAILED"  "CANCELED" 
 *		- 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 you've set the taskState before using this function 
 *							
 *
 *	Authors: Jinef & mikey
 */

// since we're working with the player object here, make sure it exists
waitUntil { !isNil {player} };
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'/><br/><br/>Prior to our landing on the main island of Chenarus, 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_killedEHadded"} ) then 
{
player addEventHandler ["killed", 
{ 
	[] spawn {
		waitUntil { alive player }; // waitUntil player has respawned
		execVM "briefing.sqf"; 
	};	
}];
player setVariable ["mk_killedEHadded", true];
};

Good luck!

The Outcast

Edited by The Outcast

Share this post


Link to post
Share on other sites

This briefing doesn't seem to work the wanted way in MP coop.

My friend died, respawned, and the taskslist reseted itself, but this is very good anyway =)

Share this post


Link to post
Share on other sites
Ive made my own mission which i play with a couple of mates online, and i was just wondering how do i write my own mission briefings for it? Ive looked through FAQ's, but couldnt find anything on ArmA 2, just OFP.

Also can i write my own evidance files?

konyo

Please SEARCH BEFORE POSTING as the sticky says.

Writing Breifings has been covered in detail. Even in multiplayer...

How to write a mission where you need to recover an evidence file has been covered in detail as well.

Share this post


Link to post
Share on other sites

tskObj1 setSimpleTaskDestination (getMarkerPos "blaaaaa")

and

tskObj1 setSimpleTaskDestination [0,0]

replaces the objective marker without a problem

Can you show me your code imutep?

Share this post


Link to post
Share on other sites

Hossa, it works! :)

I tested it with ...

tskObj1 setSimpleTaskDestination (getMarkerPos "MarkerWhoDoNotExist")

But this simple way is the best. Thx Mike

tskObj1 setSimpleTaskDestination [0,0];

Share this post


Link to post
Share on other sites

Any ideas how i can update marker color/text/type for coop player/JIP/ respawned players?

Share this post


Link to post
Share on other sites

No,at least it didn't work for my friend in my game =/. Im adding more code to the tasks but i am having some serious problems with (!isnull / isnull) things.

Share this post


Link to post
Share on other sites

Im using the briefing.sqf posted by outcast above, but i made some changes and i haven't been able to test it yet

Share this post


Link to post
Share on other sites

I can't get the 2 briefings to work.

I need one for opfor and one for bluefor.

Whenever I take out these lines out:

case WEST: // BLUFOR briefing goes here
{

};


case EAST: // REDFOR briefing goes here
{

};

It works, but both the sides get eachother's objectives, notes etc.

I read that someone did the 2 briefings a few pages back.

briefingeast.sqf

briefingwest.sqf

how do you tell them in the briefing that a briefing is WEST only, or EAST only? Thanks. :)

Share this post


Link to post
Share on other sites

New to this editor , and it feels like its the most complicated thing ever done in the history of editing maps, i mean .. like normal map editors. anyway

I dont understand anything, how does the briefing file know what map it should be connected to, how do you even create that file, cant someone just write a example of a full mission briefing.

where should i put the file.. do i need updates on the game do i need to get a mod do i have to do something with the EXE file, i mean .. i dont see that this explains alot, im sure its a great guide, but i dont understand anything of this.

I really want to make a successful singleplayer map, soo i want it to atleast have a briefing.

Cant you make steps for it all ? or something. Help would be appreciated. thanks in advance.

Share this post


Link to post
Share on other sites

When you save a mission in the editor it creates a folder under:

My Documents\ArmA 2 Other Profiles\PlayerName\missions

Any files related to the mission, such as init.sqf and briefing.sqf, would go in the folder with the name you saved it as.

For your FIRST mission, skip things like briefings and everything else, make it obvious enough that you don't need it. Learn in small steps and work up to the more complex things. You'll never get things perfect the first time, so don't kill yourself when you don't. :)

This thread already lists all the steps you need to make a briefing, if they don't make sense at all now, do more simple missions learning as you go till they do make sense.

Share this post


Link to post
Share on other sites

Is there a way to use special characters in the message notes, like '&'? I tried use &amp as in html, but it didnt work? The message will stop at the instance it found '&'. So if I write : "Go to this place & this place", in the mission the note will only output "Go to this place"

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

×