Title
end1 title
We Won!
end2 title
We lost...
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.
createDiaryRecord\\
createSimpleTask\\
setSimpleTaskDescription\\
setSimpleTaskDestination\\
setTaskState\\
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 example:
Objective 1
And image example:
Color example:
red
yellow
green
blue
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
Important Notes:
* The last added Note or Task will be on TOP, so remember to do it in reverse order!!!
* Everything in italics you can change to your own liking
* The tskAttackVishnoye is a variable which holds a reference to the task. After youve created the task, you can use that var name to manipulate the task.
* All these commands are local arg, local effect. So execute them on every machine (throw them in the init.sqf).