How to create a briefing.
ArmA 2 does not use the briefing.html anymore for the Notes and Tasks sections. The briefing.html is only used for the Debriefing text which is dependent on the EndMission trigger of the mission.
An Example briefing: (should actually be renamed to debriefing.html now BIS)
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1250"> <title>Title</title> </head> <body bgcolor="#FFFFFF"> <! -----DEBRIEFING-----> <hr> <br> <h2><a name="Debriefing:End1">end1 title</a></h2> <br> <p> <! ------victory------> We Won! </p> <br> <hr> <br> <h2><a name="Debriefing:End2">end2 title</a></h2> <br> <p> <! ------KIA------> We lost... </p> <br> <! -----DEBRIEFING END-----> </body> </html>
These different endings are activated in triggers, but I'm sure everyone knows about them already (the end1 and end2 endings are in the type listbox of the trigger menu)
So how do we give the mission players Tasks and Notes since we cant do that in the briefing.html anymore?
It's simple, and you only need to know 5 commands.
To add a Note:
player createDiaryRecord["Diary", ["The title", "The message"]];
This will add a note to your briefing. If you execute this command multiple times with the same title but different message, the messages will be timestamped.
Adding a task:
tskAttackVishnoye = player createSimpleTask["Attack Vishnoye"];
This will add a task with the title “Attack Vishnoye”. However, there is no description, and no task-marker on the map, so we need 2 additional commands.
tskAttackVishnoye setSimpleTaskDescription["Task Description", "Task Title", "HUD Title"];
This command allows you to add 3 different descriptions to your task. The 1st array element will be the description you'll see in the big box in your briefing, the 2nd will be for the title (yes, you can set that one again with this command), and the 3rd element will be the task description you'll see on the HUD (you know, when you get a move order for example you see it on the HUD, that text you can define now)
tskAttackVishnoye setSimpleTaskDestination (getMarkerPos "obj1");
If you added an empty marker near the objective, and you want a task-marker on there, you use this command. When you select this task as current task, the marker will light up. Make sure you use an existing marker here, cause otherwise it will place the task destination at [0,0].
<marker name='obj1'>Objective 1</marker>
And image example:
<font color='#FF0000'>red</font> <font color='#FFFF00'>yellow</font> <font color='#008000'>green</font> <font color='#0000FF'>blue</font>
I suggest you put these commands in a file called briefing.sqf so you keep your other files clean, and then in your init.sqf write execVM “briefing.sqf”
How to fail or accomplish a task
tskAttackVishnoye setTaskState "SUCCEEDED"; // yay, success! tskAttackVishnoye setTaskState "FAILED"; // fail