PDA

View Full Version : Basic Briefing howto



Pages : [1] 2

Mike84
Jun 2 2009, 11:35
How to make a basic Briefing in ArmA 2


In ArmA 2 BIS has decided redo the briefing system. The well known 'briefing.html' is still being used, but only for the debriefing.
The actual briefing is added by script commands, which I advise you to put in a 'briefing.sqf', and give you the ability to add 'Notes' and 'Tasks' to the briefing menu.

Ok, let's start with the simple stuff. Make a file called 'briefing.sqf' and make sure this gets executed through the 'init.sqf'. Add the following to your init.sqf:


execVM "briefing.sqf";

Now we can add the briefing commands to the briefing.sqf file, and keep the other files of your mission clean.


Adding Notes:

player createDiaryRecord (http://www.arma2.com/comref/full.html#ObjectcreateDiaryRecordArray) ["Diary", ["Title 1", "Message 1"]];

This adds a note called 'Title 1', and when you click on that a bigger message screen comes up with 'Message 1'. This is great, but we really need some formatting and ability to add links and pictures.

Linebreak/newline: <br/>
Ampersand: &amp;
Link to marker: <marker name='obj1'>Link to Marker</marker>
Show an image: <img image='somePic.jpg'/>
Show an image and manipulate the image width and height: <img image='somePic.jpg' width='200' height='200'/>

Some examples:
player createDiaryRecord (http://www.arma2.com/comref/full.html#ObjectcreateDiaryRecordArray) ["Diary", ["Title 2", "Isn't whitespace awesome? <br/><br/><br/>Yes it totally is!"]];
player createDiaryRecord (http://www.arma2.com/comref/full.html#ObjectcreateDiaryRecordArray) ["Diary", ["Title 1", "We have an objective <marker name='mkrObj1'>here</marker> and one <marker name='mkrObj2'>there</marker>"]];


Ok, you should now understand how to make a note, and what the possibilities are in the briefing message window, so let's add some tasks.



Adding Tasks

You can make tasks whenever you want (at mission start, or at any time you like duing a mission), and you can customize them a lot, but let's start with a simple one:
tskExample1 = player createSimpleTask (http://www.arma2.com/comref/full.html#ObjectcreateSimpleTaskArray) ["Task Title 1"];

This add only adds a task called 'Task Title 1', but the message box is empty. We fix this with the following command:
tskExample1 setSimpleTaskDescription (http://www.arma2.com/comref/full.html#TasksetSimpleTaskDescriptionArray) ["Task Message 1", "Task Title 1", "Task HUD Title 1"];

This sets a description to the task. The first array element is the message (like the message from the notes), the second element is the title (yes, we already defined that, but we have to redefine it here), and the third element is what gets shown on the HUD.

Note: The formatting tags that I've shown you earlier work with tasks as well.


So now that we have a task with a title and message, we can also add an objective marker to the task so we know where the objectives actually are:
tskExample1 setSimpleTaskDestination (http://www.arma2.com/comref/full.html#TasksetSimpleTaskDestinationArray) (getMarkerPos "mkrObj1");

Make sure you have an empty marker called 'mkrObj1', and you'll see a semi-transparant circular marker which will light up when you set the task as active.


Other commands

Well,now you know how to make notes and tasks, but we also need to control those tasks during the mission.

We force a task upon a player by executing this on his machine:
player setCurrentTask (http://www.arma2.com/comref/full.html#ObjectsetCurrentTaskTask) tskExample1;

This will highlight the objective marker, and show him the through the HUD where the objective is.


Now all that there's left, is setting the task status:
tskExample1 setTaskState (http://www.arma2.com/comref/full.html#TasksetTaskResultArray) "SUCCEEDED";
tskExample1 setTaskState (http://www.arma2.com/comref/full.html#TasksetTaskResultArray) "FAILED";
tskExample1 setTaskState (http://www.arma2.com/comref/full.html#TasksetTaskResultArray) "CANCELED";
tskExample1 setTaskState (http://www.arma2.com/comref/full.html#TasksetTaskResultArray) "CREATED";

"SUCCEEDED" = Makes the checkbox green
"FAILED" = Puts a red cross in the checkbox
"CANCELED" = Puts a grey diagonal line through the checkbox
"CREATED" = Clears the checkbox (makes it look like you've just created it)


You can also show the state of the task with the taskHint command, but since that command is kinda hard to use, we're gonna use a function that I've made to make a lot easier to show the task state.



How to make task hints

If you wanna make taskHints that look like this:
http://img141.imageshack.us/img141/1043/taskstatus.png
then go and grab my taskHint function at http://www.ofpec.com/forum/index.php?topic=33768.0


And that's pretty much it for a basic briefing. I'll try to add more advanced stuff to it when I have some more time.



Templates

I've made briefing.sqf and briefing.html templates. Grab them at ofpec:

http://www.ofpec.com/forum/index.php?topic=33468.0

EiZei_
Jun 2 2009, 12:12
Quite useful, but should'nt stuff like this be posted in the community wiki though?

CarlGustaffa
Jun 2 2009, 13:08
When you select this task as current task, the marker will light up.

Hmm, is there a way to not make it 'light up', since often we will use separate markers for different types of tasks (attack, defend)?

Mike84
Jun 2 2009, 13:20
well, if you put a destination to the task it will create a marker. So if you dont want the game-engine to add a marker there, just omit the setSimple taskDestination command

Hund
Jun 2 2009, 13:30
Hmm, is there a way to not make it 'light up', since often we will use separate markers for different types of tasks (attack, defend)?

True, use an invisible marker to get the same effect you saw in the campaign, ie. the orange marker thing. I was wondering why BIS had put the invis marker on top until i figured that out.

Radioshack.
Jun 5 2009, 02:45
Thanks for the guide mate! Did you figure out how to use links inside the briefing and is it possible to add something to the map section of the briefing as well?

greetings

froggyluv
Jun 5 2009, 03:21
Thank god! I've been racking my brains over getting a briefing to work for the last couple of hours and was just about to start another thread.

Edit- Not working for me, guess I'll have to wait for something more idiot proof.

Edit edit- Finally got it :)

Roler
Jun 5 2009, 08:43
Finally! I couldn't find anything about new briefings, thanks!

SaOk
Jun 5 2009, 08:55
How can I hide a task at start and make it active (visible) later? Or is it possible to add tasks in middle of the other tasks during the mission? Having the tasks in right order would be important in bigger and complex missions.

SaOk
Jun 5 2009, 12:59
Thanks - that works great. :)

gunzz
Jun 7 2009, 03:00
Ok, I'm new to scripting and such. I'm trying to build a basic mission of clearing a town. How do I add a briefing?Just something simple that says "The town of xyz is held by insurgents. Your task is to take your team along with the support of xyz team and eliminate them"

Lightninguk
Jun 7 2009, 09:29
please check my code thanks



<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<!--------------------------------------------------------->
<!-- Briefing file for Armed Assault -->
<!-- Created with ArmA Edit - Version 1.3.4000 -->
<!-- -->
<!-- DO NOT edit this file manually to guarantee it can -->
<!-- be re-opened by the Briefing Wizard. Click the -->
<!-- "Edit Briefing" button on the toolbar to edit. -->
<!--------------------------------------------------------->
</head>
<body>

<!-- [BRIEFING_WIZARD_30] -->

<!---------------------------------------------------->
<!-- Plans -->
<!---------------------------------------------------->
<p><a name="plan"></a>
<!-- [PLAN] -->
Your mission tonight is to eradicate all 3 radar and radio Towers from the towns of Parlovo,Zelengorsk,Komarovo which is currently under Russia control.<br><br>Good luck!
<!-- [END] -->
</p><hr>

<!---------------------------------------------------->
<!-- Notes (in handwriting) -->
<!---------------------------------------------------->
<h6><a name="main"></a>
<!-- [NOTES] -->
Mission by Lightninguk<br><br>Uses Ambient Civillian,Civiilian Vehicles,First AId,
<!-- [END] -->
</h6><hr>

<!---------------------------------------------------->
<!-- Objectives -->
<!---------------------------------------------------->
<!-- Objective 1 -->
<p><a name="obj_1"></a>
<!-- [OBJ_1] -->
<a href = "marker:obj1">you will Start on USS Iwo Jima LHD7</a>
<!-- [END] -->
</p><hr>

<!-- Objective 2 -->
<p><a name="obj_2"></a>
<!-- [OBJ_2] -->
<a href = "marker:obj2">USMC Has made a beach landing near the town of Kamenka and is under it control</a>
<!-- [END] -->
</p><hr>

<!-- Objective 3 -->
<p><a name="obj_3"></a>
<!-- [OBJ_3] -->
<a href = "marker:obj3">Search and destroy the radio tower in Parlovo</a>
<!-- [END] -->
</p><hr>

<!-- Objective 4 -->
<p><a name="obj_4"></a>
<!-- [OBJ_4] -->
<a href = "marker:obj4">Destroy the Radar Tower in the town of Zelengorsk</a>
<!-- [END] -->
</p><hr>

<!-- Objective 5 -->
<p><a name="obj_5"></a>
<!-- [OBJ_5] -->
<a href = "marker:obj5">Move to the town of Komarovo and blow up the last radio Tower</a>
<!-- [END] -->
</p><hr>

<!---------------------------------------------------->
<!-- Debriefing -->
<!---------------------------------------------------->
<!-- End #1 -->
<h2><a name="debriefing:end1"></a><br>
<!-- [TITLE_1] -->
Missiom Complete
<!-- [END] -->
</h2><br><p>
<!-- [TEXT_1] -->
Good Work
<!-- [END] -->
</p><br><hr>

</body>
</html>


briefing SQF


player createDiaryRecord["Diary", ["Briefing", "Your mission today is to eradicate all radio and radar Staion in the east part of the map
tskobj1 = player createSimpleTask["Start at USS IWO JIMA LHD7"];
tskobj2 = player createSimpleTask["If you are kill you will spawn in USMC Town Kamenka"];
tskobj3 = player createSimpleTask["Destroy Radio Station in Parlovo"];
tskobj3 = player createSimpleTask["Seach and Destroy Radar Station in Zelengorsk"];
tskobj4 = player createSimpleTask["Find and Destroy Radar Station in Komarovo"];


tskobj1 setSimpleTaskDestination (getMarkerPos "obj1");
tskobj2 setSimpleTaskDestination (getMarkerPos "obj2");
tskobj3 setSimpleTaskDestination (getMarkerPos "obj3");
tskobj4 setSimpleTaskDestination (getMarkerPos "obj4");
tskobj5 setSimpleTaskDestination (getMarkerPos "obj5");

MechaStalin
Jun 7 2009, 11:29
Your player createDiaryRecord is missing the closing brackets and semi-colon at the end. :)

player createDiaryRecord["Diary", ["The title", "The message"]];

Lightninguk
Jun 7 2009, 13:07
thanks i done that but still no biefing

Wass
Jun 7 2009, 13:14
What kind of string can use setTaskState command, exept "SUCCEEDED" and "FAILED"?

Bear_Pack
Jun 8 2009, 00:15
Newb question. Where do I find the Init.sqf file?
I've checked C:\Users\matt\Documents\ArmA 2 Other Profiles\[RIP]Bear_Pack\missions\test1.utes
The only thing in this folder is the mission.sqm and the description.ext that I placed there. Do I need to create one?

Manzilla
Jun 8 2009, 00:54
Newb question. Where do I find the Init.sqf file?
I've checked C:\Users\matt\Documents\ArmA 2 Other Profiles\[RIP]Bear_Pack\missions\test1.utes
The only thing in this folder is the mission.sqm and the description.ext that I placed there. Do I need to create one?

Yes and a briefing.sqf if you are following these instructions.


Alright, I gotta a dumb question. I've got the tasks, notes, etc setup in game but I'm not sure how to get the tasks to checkoff when it's complete. Where do I insert the trigger name, like I did in the briefing.html in A1.

Thanks for the tutorial by the way. There's no way in hell I would've ever figured this one out.

[GLT] Legislator
Jun 8 2009, 06:33
Hi,

I've got a question. My briefing is working so far but after respawn in multiplayer games the briefing entries are gone. How can I fix this without screwing around much? What about JIP compatibility?

Delicious
Jun 8 2009, 08:06
Yes and a briefing.sqf if you are following these instructions.


Alright, I gotta a dumb question. I've got the tasks, notes, etc setup in game but I'm not sure how to get the tasks to checkoff when it's complete. Where do I insert the trigger name, like I did in the briefing.html in A1.

Thanks for the tutorial by the way. There's no way in hell I would've ever figured this one out.

You can create a trigger that runs

task1 setTaskState "SUCCEEDED"
in the on act. field when you have completed a certain condition, such as killing an officer or something.

Jezuro
Jun 8 2009, 09:28
What kind of string can use setTaskState command, exept "SUCCEEDED" and "FAILED"?
"Succeeded", "Failed", "Created", "Canceled".

Wass
Jun 8 2009, 11:00
"Succeeded", "Failed", "Created", "Canceled".

Thanks :)

Manzilla
Jun 8 2009, 11:28
You can create a trigger that runs

task1 setTaskState "SUCCEEDED"
in the on act. field when you have completed a certain condition, such as killing an officer or something.

This is what I've been doing, I think. But when I add

obj_1 setTaskState "SUCCEEDED";

to a trigger the corresponding task is already checked as complete when the game starts up.

I have a trigger with an OPFOR activation, not present, name " obj_1 ", condition " !(alive off1); ", On Act " obj_1 setTaskState "SUCCEEDED"; ".

Then I have a unit on the map marked " off1 ".

Mike84
Jun 8 2009, 11:39
@<hidden>

Try it with a radio trigger first (for example radio alpha, and press 0-0-1 ingame). If that works, something else must be wrong.


@<hidden>

Thnx (although I would've preferred 2 L's in canceled/cancelled) :)

And a possible bug Jezuro, "ASSIGNED" is a valid taskState as well, but it will only cause confusion if players set their own tasks active, or when mission makers use setCurrentTask.

Manzilla
Jun 8 2009, 11:54
@<hidden>

Try it with a radio trigger first (for example radio alpha, and press 0-0-1 ingame). If that works, something else must be wrong.


@<hidden>

Thnx (although I would've preferred 2 L's in canceled/cancelled) :)

Thanks mike 84, I'll give it a try.

EDIT:

Can't seem to get it to work. Not sure what I'm doing wrong here. I'll have to find a simple mission with it set up and check what was done. Hopefully once this is figured out I'll be ready to release the mission.

EDIT2:
Figured it out. But now the tasks will get marked as complete but no Objective complete message appears on the screen.

Mike84
Jun 8 2009, 13:03
EDIT2:
Figured it out. But now the tasks will get marked as complete but no Objective complete message appears on the screen.

add a hint message



tskObj1 setTaskComplete "SUCCEEDED"; hint "You've completed obj1!";


Use that for now, I just found the taskHint command which might be better, but the documentation on the comref is faulty, so it will take some time to figure it out.

Manzilla
Jun 8 2009, 13:49
add a hint message



tskObj1 setTaskComplete "SUCCEEDED"; hint "You've completed obj1!";


Use that for now, I just found the taskHint command which might be better, but the documentation on the comref is faulty, so it will take some time to figure it out.

Jeez thanks Mike84, I appreciate all your help. I'm a little embarrassed it was so easy to do.

Mike84
Jun 8 2009, 14:05
How to make task hints

taskHint is relatively useless itself (because it requires too much effort), but there is a script that makes it easier to use. So instead of executing a hint, do this:


[objNull, ObjNull, tskExample1, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";

The first 2 arguments are useless so i just send objNull, the 3rd is the task that you've created, and the 4th is the status.

Supported task states:

"CREATED"
http://img198.imageshack.us/img198/7425/statuscreated.png

"CURRENT"
http://img229.imageshack.us/img229/3751/statuscurrent.png

"CANCELED"
http://img229.imageshack.us/img229/206/statuscanceled.png

"SUCCEEDED"
http://img141.imageshack.us/img141/1043/taskstatus.png

"FAILED"
http://img198.imageshack.us/img198/8429/statusfailed.png



NB,

- This command does not set the state of the task, so you still need to do this command, and the setTaskState command in your trigger.

- It creates the hint in the middle of the screen, not at the right side (this means that taskHint and hint can be used at the same time)

Jezuro
Jun 8 2009, 14:21
And a possible bug Jezuro, "ASSIGNED" is a valid taskState as well, but it will only cause confusion if players set their own tasks active, or when mission makers use setCurrentTask.
That's why I didn't mention that in the first place isn't it? ;)

Mike84
Jun 8 2009, 14:28
That's why I didn't mention that in the first place isn't it? ;)

true, but i'm 100% sure someone is going to use it, and gonna confuse the shit out of people. But I guess it can't be removed, so let's keep it on the DL then :rolleyes:

Eik
Jun 8 2009, 18:56
Thank you for this information useful, I have some questions regarding the formatting of text.
Can we, as in the briefing html, change of font, have the text of different colors or simply have a newline?

(Sorry for my bad english)

Mike84
Jun 8 2009, 20:40
You can do newlines with <br/>

Changing of font type or colour has never been supported in ofp/arma1 i think, so I doubt it's possible in arma 2

Delicious
Jun 9 2009, 15:14
Does anyone know how to create the clickable links in the briefing now?

For example: in the briefing it says "Take the town of Stary Sobor" and the Stary Sobor part is clickable and centers on the correct map location. Cheers.

Mike84
Jun 9 2009, 15:27
For example: in the briefing it says "Take the town of Stary Sobor" and the Stary Sobor part is clickable and centers on the correct map location. Cheers.

Create an empty marker called obj1, and put it on Stary Sobor, and put this in your briefing:


<marker name='obj1'>Objective 1</marker>

MortenL
Jun 9 2009, 19:13
kk, i have an init.sqf saying
execVM "briefing.sqf"

and a briefing.sqf saying:

player createDiaryRecord["Diary", ["Situation", "Destroy the enemy Anti-Air Radar"]];

tskobj1 = player createSimpleTask["Insertion"];
tskobj1 setSimpleTaskDescription["Insertion by boat"];
tskobj1 setSimpleTaskDestination (getMarkerPos "obj1");

tskobj2 = player createSimpleTask["Destroy Anti-Air Radar"];
tskobj2 setSimpleTaskDescription["Destroy the Anti-Air Radar"];
tskobj2 setSimpleTaskDestination (getMarkerPos "obj2");

tskobj3 = player createSimpleTask["Extraction"];
tskobj3 setSimpleTaskDescription["Get to the LZ for chopper extraction"];
tskobj3 setSimpleTaskDestination (getMarkerPos "obj3");

tskobj4 = player createSimpleTask["Get back to the carrier"];
tskobj4 setSimpleTaskDescription["Get back to the carrier"];
tskobj4 setSimpleTaskDestination (getMarkerPos "obj4");

Nothing shows up anywhere, this is my first time creating a briefing, haven't even tried in Arma1. So yea, probably some stupid mistake, but i have read and reread this thread 3 times now and can't seem to find the problem?

Sorry for bothering.

Mike84
Jun 9 2009, 20:54
Well, you're using "setSimpleTaskDescription" wrong. You only give the array you're passing 1 element, while the howto says to give 3.

For the tasks not showing up, I have no clue. I copied over the code and it worked fine, bar the task descriptions of course.

Anyhow, check your rpt file (http://community.bistudio.com/wiki/arma.RPT) for errors, because there is something else wrong here.

Icewindo
Jun 9 2009, 21:22
Uhm what would be the easiest way to get the new briefing to work for respawns/JIPs? My briefing files are in a briefing.sqf which will get executed by the init.sqf.

I tested my mission and the objectives work so far, but everything won't show up after respawn.

Why couldn't they just keep the old briefing... everything was fine and easier to use :( .

Midhaven
Jun 11 2009, 13:29
Uhm what would be the easiest way to get the new briefing to work for respawns/JIPs? My briefing files are in a briefing.sqf which will get executed by the init.sqf.

I tested my mission and the objectives work so far, but everything won't show up after respawn.

Why couldn't they just keep the old briefing... everything was fine and easier to use :( .

Yeah, I have this problem aswell.. Sollution?

[GLT] Legislator
Jun 11 2009, 14:04
Try the script shown here (http://www.g-g-c.de/forum/showthread.php?t=10629).

I haven't tested it yet. Maybe it's gonna work.

Cyborg11
Jun 11 2009, 20:26
Yeah, I have this problem aswell.. Sollution?
Solution:
Write this in the init from all your playable units:

this addEventHandler ["killed", {_this execVM "respawn_player.sqf";}];

respawn_player.sqf:

sleep playerRespawnTime;
player exec "briefing.sqs";

But if you want that this works, you must create your Briefing in a seperate file :) And I don't know if a task is marked as succeeded when it's done but the player spawns again.

nullsystems
Jun 13 2009, 15:59
I too have similar problems:

http://forums.bistudio.com/showthread.php?t=74016

nullsystems
Jun 13 2009, 18:53
Some more information:
Still unable to get tasks to be updated for new players and still removing TASKS for respawned players.
Also, the hint doesnt show...

Trigger Cond:
isServer & No Opfor

OnAct:
setmarkercolor green; vybordown = 1; publicVariable vybordown; hint "Vybor Done";

Briefing.sqf:


private ["_diary"];

_diary = player createDiaryRecord["Diary", ["Briefing", "Still testing this out. Most vehicles locked until future versions!"]];

town1 = player createSimpleTask ["obj1"];
town1 setSimpleTaskDescription ["Clear each of the towns marked on the map.","Clear Vybor.","Clear Vybor."];
town1 setSimpleTaskDestination (getMarkerPos "obj1");
if (isNil "vybordown") then {
town1 settaskstate "Created";
} else {
town1 settaskstate "Succeeded";
"obj1" setMarkerColor "ColorGreen";
};

Cyborg11
Jun 13 2009, 21:48
Try this for your Trigger:

Cond: !(alive player)
Deact: setmarkercolor green; vybordown = 1; publicVariable vybordown; hint "Vybor Done";

SiC-Disaster
Jun 14 2009, 08:03
Could someone perhaps make a briefing example file?
One where you only have to change stuff to fit your own mission?
That would be greatly appreciated, cause i don't know where to get this .sqf file or something... I was used to the html thing, but this is just confusing:confused:

nullsystems
Jun 14 2009, 10:49
Try this for your Trigger:

Cond: !(alive player)
Deact: setmarkercolor green; vybordown = 1; publicVariable vybordown; hint "Vybor Done";

But then the mission would only show done if you die lol.

nullsystems
Jun 14 2009, 14:14
I now have this partly working.
I just setup a loop for when the player is alive again, to re-trigger the briefing.sqf.

However, tasks do not show UNLESS I click on "PLAYERS" on the map section, then the TASKS show up. Strange behaviour.

This is fixed in Aircav by Xeno, but I cannot find how they are automatically shown again after a few seconds from respawn.

Icewindo
Jun 14 2009, 17:16
Could someone perhaps make a briefing example file?
One where you only have to change stuff to fit your own mission?
That would be greatly appreciated, cause i don't know where to get this .sqf file or something... I was used to the html thing, but this is just confusing:confused:

I support this request... I'm stuck at my the briefing now (everything else is finished).

buffbot
Jun 15 2009, 04:26
[QUOTE=Mike84;1303394]How to make task hints




[objNull, ObjNull, tskExample1, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";


how do i get this taskHint.sqf ?

if i use this code in the activation field of the trigger, the editor returns an error: "Typ Script, expect nothing"

nullsystems
Jun 15 2009, 09:49
Thats quite off topic :/

Mike84
Jun 15 2009, 12:12
[QUOTE=Mike84;1303394]How to make task hints




[objNull, ObjNull, tskExample1, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";


how do i get this taskHint.sqf ?

if i use this code in the activation field of the trigger, the editor returns an error: "Typ Script, expect nothing"

Use:



nul = [objNull, ObjNull, tskExample1, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";

because the editor always wants to save the script handle (i still dont get why, but whenever you get that error, just put "nul = " in front of it).

buffbot
Jun 15 2009, 13:07
thank you mike! it worked out that way.

Cyborg11
Jun 15 2009, 15:20
But then the mission would only show done if you die lol.
You must create the briefing in a seperate file/init ;) The trigger is for respawned players.

C.L.A.N.Martin
Jun 15 2009, 17:03
[QUOTE=Mike84;1303394]How to make task hints




[objNull, ObjNull, tskExample1, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";


how do i get this taskHint.sqf ?

if i use this code in the activation field of the trigger, the editor returns an error: "Typ Script, expect nothing"

I solved it this way:
-put this in "on Activation" of the trigger:
xhandle= [objNull, ObjNull, tskExample1, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";

I found it in the Air Cav designed by Xeno.

SiC-Disaster
Jun 15 2009, 18:53
So is there anyone with a full working briefing file who is willing to share it for others to use?
It would be greatly appreciated, i really don't know how to create the file myself.
I've got a mission all working but the only thing it really still lacks is a briefing, and it would be a shame to push the mission out the door without it.

[GLT] Legislator
Jun 15 2009, 19:03
@<hidden>:
You can download and de-pbo my mission if you want: http://www.armaholic.com/page.php?id=5955

Everyone is free to use the briefing.

SiC-Disaster
Jun 15 2009, 23:00
Thanks Legislator :)
My only problem now though is i cant use CBPO to open the pbo file.
I just get a quick flash of a DOS screen or something, but i cant extract anything, and no such option turns up anywhere.
I've ran CBPO before trying anything, but i think something doesnt quite work out there.

Edit: Got it working. Needed to delete some keys from regedit.
Anyways, where is this briefing located? I can't seem to find it... Sorry for the newbness.

Dhill68
Jun 16 2009, 03:30
Hi All,

I was having trouble creating briefings for A2 and I found this snippet somewhere.....

//init.sqf

//Dummy task to active briefing
MyTag_DummyTask = player createSimpleTask ["DummyTask"];
MyTag_DummyTask setSimpleTaskDescription ["DummyTask", "DummyTask", ""];

player setCurrentTaskMyTag_DummyTask;


Supposedly by using this in init.sqf a dummy task is created and this in turn loads briefing from briefing.html, However I cannot get it to work... Any suggestions..... ???

A task does appear in the briefing but its named DummyTask.....

Any help appreciated, or Could someone write a small program or script to get the relevant info from briefing.html and create a briefing.sqf... ???

[GLT] Legislator
Jun 16 2009, 08:19
Edit: Got it working. Needed to delete some keys from regedit.
Anyways, where is this briefing located? I can't seem to find it... Sorry for the newbness.

You can find it in the initJIPcompatible.sqf.

nullsystems
Jun 16 2009, 13:05
There is nothing in initJIPCompatible, whats the point of it?

Also, anyone found out how to get TASKS to show again after death?
I can ADD them again easily, but they dont show in the MAP unless you click on PLAYERS first.

[GLT] Legislator
Jun 16 2009, 14:26
There is nothing in initJIPCompatible, whats the point of it?


Well that's not true ;)

That's the briefing part:

//Briefingeinträge
_diary6 = player createDiaryRecord ["Diary", ["Technische Details", "Keine"]];
_diary5 = player createDiaryRecord ["Diary", ["Historisches", "Die Invasion von Utes am 1.11.2009 stellte den Beginn des Chernarussischen Verteidigungskrieges dar. Nach dem Abzug der amerikanischen Truppen von Utes im Oktober 2009 sicherte ein Batallion der Russen unter dem Kommando von General Anatoli Nogowizyn die Insel Utes und befestigte den Flughafen.<br /><br />Die Eroberung von Utes war ein notwendiger Schritt um erneut vor der chernarussischen Küste Fuss zu fassen. Der Flughafen auf Utes wurde im Speziellen für die Bereitstellung des Supports für amerikanische A-10 Thunderbolts und als Ankerplatz für die USS Khe Sanh benötigt."]];
_diary4 = player createDiaryRecord ["Diary", ["Wetterbericht", "Für den frühen Morgen wurde keinerlei Unwetter voraus gesagt. Bei kühlen 3 Grad Celsius bleibt die Wetterlage verbessert sich die Wetterlage sogar leicht in den nächsten Stunden hinweg. Niederschläge sind nicht zu erwarten."]];
_diary3 = player createDiaryRecord ["Diary", ["Aufklärungsbericht", "Die 58. Armee hat Utes stark befestigt. Ein kurzer Überflug hat gezeigt, dass wir kaum Panzeraktivität zu verzeichnen haben. Auch wenn die Insel durch zahlreiche Patrouillen überwacht wird, so befindet sich der Großteil der Feindsoldaten noch in der Nachtruhe. Wenn Sie leise zuschlagen, haben Sie die besten Chancen auf Erfolg. <br /><br />Wir haben zahlreiche Magazine für Ihre Waffen in Ihre Schlauchboote gepackt. Nutzen Sie sie bei Munitionsknappheit."]];
_diary2 = player createDiaryRecord ["Diary", ["Fuhrpark", "Unser Fuhrpark besteht aus:<br /><br /> 5 CRRC Schlauchbooten"]];
_diary1 = player createDiaryRecord ["Diary", ["Briefing", "Der Plan sieht vor, dass Sie um 5.20 Uhr morgens an der <marker name=""Landezone_A"">Landezone A</marker> und an der <marker name=""Landezone_B"">Landezone B</marker> an Land gehen. Tarnung ist Ihre oberste Pflicht! Wir haben Sie zwar mit Sprengladungen ausgestattet, doch diese sollten Sie nur im äußersten Notfall verwenden. <br /><br />Sie bilden eine Aufklärungseinheit um die feindliche Luftabwehr auf der Insel zu finden und zu sabotieren. Der Feind darf davon nichts weiter mitbekommen. Zeitnah nach der Sabotage der feindlichen Luftabwehr, welche wir auf insgesamt 4 Igla-Geschütze schätzen, und der Sicherung des <marker name=""Strand"">Strandes</marker> werden wir mit der Invasion beginnen."]];

//Missionsziele
task2 = player createSimpleTask ["obj2"];
task2 setSimpleTaskDescription ["Wir gehen davon aus, dass der Feind einige stationären Igla-Luftabwehrgeschütze stationiert hat. Da unsere UAV Drohnen momentan nicht einsatzbereit sind, bilden Sie eine Aufklärungseinheit um die feindlichen Luftabwehrstellungen zu finden und zu sabotieren.<br /><br />Der Geheimdienst geht davon aus, dass sich die Luftabwehrstellungen in der Nähe der Ortschaften auf erhöhten Stellungen befinden.<br /><br />Wichtig: zerstören Sie die Geschütze nicht um den Feind nicht vorzuwarnen! Sabotieren Sie die Geschütze und töten Sie sämtliche Soldaten in deren Nähe.","Hauptziel: Luftabwehr sabotieren","Luftabwehr sabotieren"];
task2 settaskstate "Created";

task1 = player createSimpleTask ["obj1"];
task1 setSimpleTaskDescription ["Die russische 58. Armee hält den <marker name=""Strand"">Strand</marker> im Südwesten besetzt. Solange die stationären Geschütze dort aktiv sind, können wir keine Truppenlandung riskieren. Das südwestliche Strandgebiet ist demnach vollständig zu sichern.","Hauptziel: Strand sichern","Strand sichern"];
task1 setSimpleTaskDestination markerpos "Strand";
task1 settaskstate "Created"; //Created, Succeeded, Failed

//Missionsziel wird vorausgewählt
player setCurrentTask task1;

Sorry it's in german, simply replace the text strings. No solution so far for disappearing briefing entries after respawn. There are some script solutions but I don't know how to set them up yet. It'll take some time. My hope lies in patch 1.02 that hopefully fixes the briefing problem.

IndeedPete
Jun 17 2009, 02:09
Hm, I copied Legislator's briefing 1:1 but it still doesn't work. I can't see anything. Any suggestions?


Edit: The RPT file says that there's an "invalid number in expression" in my "init.sqf".

I used: execVM "briefing.sqf"

[GLT] Legislator
Jun 17 2009, 04:54
Try: [] execVM "briefing.sqf"

Make your the briefing.sqf is saved with UTF-8 code (check your text editor for the settings).

And if nothing works, just leave it in the initJIPCompatible.sqf for the time being.

IndeedPete
Jun 17 2009, 11:00
I still don't know what was wrong, but it works now. Tank you! =)

nullsystems
Jun 17 2009, 11:02
But that still doesnt solve the TASKS disapearing on death.
You can re-add them with a loop which waits for you to be alive again, but you have to manually select PLAYERS first to do it.
Anyone got a way around not having to select "players" in the map first?

IndeedPete
Jun 17 2009, 16:18
I used
#start

//Briefingeinträge
_diary5 = player createDiaryRecord ["Diary", ["Hinweise", "Keine."]];
_diary5 = player createDiaryRecord ["Diary", ["Bewaffnung", "Da die Mission möglichst unauffälig verlaufen soll, werden Sie ausschließlich mit schallgedämpften Waffen bzw. Scharfschützengewehren aus dem Sortiment des Force Recon ausgestattet."]];
_diary4 = player createDiaryRecord ["Diary", ["Wetterbericht", "Klar, 8 C°, maximale Sichtweite."]];
_diary3 = player createDiaryRecord ["Diary", ["Feindpräsens", "Befestigung<br />Eine Strassensperre.<br /><br />Infanterie<br />Ca. ein Platoon leichte Infanterie. Konzentriert in drei Lagern bzw. in Patroullien zwischen den Lagern.<br /><br />Motorisierte Streitkräfte<br />Mehrere Jeeps. Vermutlich bewaffnet.<br /><br />Luftwaffe<br />Keine.<br /><br />Unterstützung<br />Keine.<br /><br />Feindstatus<br />Der Feind ist aufmerksam, erwartet jedoch keinen Angriff."]];
_diary2 = player createDiaryRecord ["Diary", ["Hintergrund", "Seit ca. zwei Wochen tobt ein blutiger Bürgerkrieg zwischen der tschernarussischen Regierung und den ,von Russland unterstützten, kommunistischen Aufständischen. Die regierungstreuen Chernarussian Defence Forces (CDF) wurden in den Südwesten des Landes zurückgedrängt, und könnnen ohne Hilfe vermutlich nicht mehr länger als drei Tage durchhalten. Aus Teilen der Zivilbevölkerung hat sich inzwischen eine militante Guerrilabewegung geformt, die uns momentan noch freundlich gegenübersteht. Außerdem hat Russland seine Truppen an der Grenze zu Tschernarussland verstärkt, was befürchten lässt, dass es bald zu einer russischen Intervention kommen wird. Es ist kein Geheimnis, dass Russland starkes Interesse an den Bodenschätzen des Ex-Sowjetstaates hat. Wir greifen in den Konflikt ein, um weitere Massaker und ethnische Säuberungen zu verhindern und der pro-westlichen, tschernarussischen Regierung wieder zur Macht zu verhelfen."]];
_diary1 = player createDiaryRecord ["Diary", ["Plan", "D-Day<br /><br />Der Plan sieht vor, dass Ihre Einheit am D-Day gegen 0030 Uhr, also 5 Stunden vor der geplanten Invasion, per Fallschirm hinter den feindlichen Linien abgesetzt wird, um feindliche Stellungen zu sabotieren. Sie werden aus einer MV-22 Osprey, aus ca. 200 metern Höhe über der <marker name=""3"">Landezone</marker> abspringen. Von dort aus vernichten Sie alle Feinde an der <marker name=""4"">Strassensperre</marker>. Dann rücken Sie zum Primärziel -dem <marker name=""5"">Störsender</marker>- vor, um es zu zerstören. Ist das Primärziel ausgeschaltet, begeben Sie sich zu <marker name=""6"">Point Delta</marker> und warten dort auf weitere Befehle."]];

//Missionsziele
task4 = player createSimpleTask ["obj4"];
task4 setSimpleTaskDescription ["Begeben Sie sich zu <marker name=""6"">Point Delta</marker>!","Point Delta","Point Delta"];
If (m4) then {task4 setTaskState "SUCCEEDED"} else {task4 setTaskState "CREATED"};

task3 = player createSimpleTask ["obj3"];
task3 setSimpleTaskDescription ["Zerstören Sie den <marker name=""5"">Störsender</marker>!","Störsender zerstören","Störsender zerstören"];
If (m3) then {task3 setTaskState "SUCCEEDED"} else {task3 setTaskState "CREATED"};

task2 = player createSimpleTask ["obj2"];
task2 setSimpleTaskDescription ["Zerstören Sie die <marker name=""4"">Strassensperre</marker>!","Strassensperre zerstören","Strassensperre zerstören"];
If (m2) then {task2 setTaskState "SUCCEEDED"} else {task2 setTaskState "CREATED"};

task1 = player createSimpleTask ["obj1"];
task1 setSimpleTaskDescription ["Springen Sie über der <marker name=""3"">Landezone</marker> ab!","Abspringen","Abspringen"];
If (m1) then {task1 setTaskState "SUCCEEDED"} else {task1 setTaskState "CREATED"};

~10

goto "start"

but it gives an error, called "Error 7". Does someone know what "Error 7" means?

W0lle
Jun 17 2009, 18:03
You have saved the briefing as .sqf or .sqs file?

If it's a sqf file then

~10

is wrong and must be changed to

sleep 10;

goto "start"

is also not used in an .sqs file.

Save your briefing as briefing.sqf and call it in the init.sqs/sqf with


[] execVM "briefing.sqf"

Icewindo
Jun 19 2009, 21:24
So uhm anyone care to share a working briefing file with respawn :p ?

I just hope this gets fixed in the next patch, it's really tedious and scares people of editing :( . Plus, it makes ArmA/OFP conversions much harder, they really could have added some backwards compability for briefing.html .

Nieldo
Jun 21 2009, 18:22
Currently making a multiplayer map and need to set different tasks and notes for both USMC and RU forces. How do I do this?

At the moment I can set tasks and notes but both sides see the same ones.

DiRaven
Jun 21 2009, 18:59
if (playerSide == EAST) then {
PlaceHereYourCodeForTasksCreatingForEastOnes;
}

if (playerSide == WEST) then {
PlaceHereYourCodeForTasksCreatingForWestOnes;
}

Make sure this code executed on every machine (put it in init.sqf for example).

Nieldo
Jun 21 2009, 19:19
Great thank you DiRaven :)

etjester
Jun 24 2009, 04:41
Hi.

I've been using the technique in the OP to make objectives, and it works as intended for single player. However, I've had trouble making multiplayer missions. I'm using RespawnType 5 to allow players to use teamswitch upon death to enter the body of another Playable soldier. However, any active objectives and objective markers don't seem to reappear after the respawn. Objectives that are subsequently created during the mission will still appear, but I'm wondering how to make a player respawn with all the objectives they had prior to their death.

Any suggestions?

Nieldo
Jun 24 2009, 15:01
if (playerSide == EAST) then {
PlaceHereYourCodeForTasksCreatingForEastOnes;
}

if (playerSide == WEST) then {
PlaceHereYourCodeForTasksCreatingForWestOnes;
}

Make sure this code executed on every machine (put it in init.sqf for example).

Got around to trying this out and it doesnt work as expected.

If you put easts script first everything works fine for east, but then west doesnt get any tasks or notes. Wests first, east doesnt get any.

Edit: I figured out a way around it, create two .sqf files, BreifingWEST and BreifingEAST. Then call them both out of the init.sqf file using

[] execVM "breifingEAST.sqf";
[] execVM "breifingWEST.sqf";

Benedict0616
Jun 24 2009, 16:39
Wow thanks so much! ive been trying to do it in a briefing.html file for hours now. this just saved me from jumping out of a window ;)

callaway
Jun 24 2009, 19:41
I've gotten my briefing and tasks working; however, I don't get anything on the player hud. Which command marks the hud?

Mike84
Jun 24 2009, 21:47
For people having problems, try out the briefing template that I use:

Click (http://www.ofpec.com/forum/index.php?topic=33468.msg231310#msg231310)


@<hidden>

It should be the 3rd element of the array you pass to setSimpleTaskDescription.

MattXR
Jun 24 2009, 22:07
Thanks mike ;)

callaway
Jun 25 2009, 03:11
Is there any way to active a task on-hud waypoint without clicking the link in the task desc?

EDIT, never mind, I figured it out :)

Nephris1
Jun 25 2009, 15:49
Good evening Gentlemen,
to follow the period of asking for "is there any way..."

Is there any way for implement pictures into the Briefing itself...for misisons like "kill that ugly officer" ?

Eik
Jun 25 2009, 16:26
Something like that:


<img image='mypict.paa' />

VanhA-ICON
Jun 25 2009, 17:39
There is nothing in initJIPCompatible, whats the point of it?

Also, anyone found out how to get TASKS to show again after death?
I can ADD them again easily, but they dont show in the MAP unless you click on PLAYERS first.

It's a long shot so to speak but I'm just trying it this way:
(Only applies when using norrins revive script & not tested yet)

In revive_init.sqf you can find lines where to add commands after revive/respawn

NORRNCustomExec1 ="execVm ""briefing.sqf"";hint ""check notes"";"; // Exec1 occurs following being revived
NORRNCustomExec2 =""; // Exec2 occurs when you team kill
NORRNCustomExec3 ="execVm ""briefing.sqf"";hint ""check notes"";";

Could this solve something?

Nephris1
Jun 26 2009, 13:28
Do i have to set my variable i set with e.g.
tskfuel setSimpleTaskDescription ["...."] (means here: tskfuel) as a publicvariable on a server/mpmap to make it workin properly?

Mike84
Jun 26 2009, 16:14
no, you need to run the command on all clients

Nephris1
Jun 26 2009, 18:37
So i ask a bit more directly.

Do i ve to set a task variable like tskfuel
tskfuel setSimpleTaskDescription ["...."]
as Publicvariable "tskfuel" on dedicated server machines?

Nephris1
Jun 28 2009, 03:27
Sry for bumbing that thread again, but i stuck a bit at my briefing.
When i host the map myself each player can read the briefing.
When i host the map on my dedicated noone can see the briefing.

Is there certain special to concern in multiplayer with the briefing?

Nemorz
Jun 28 2009, 22:35
I can't wait til theres alot more documentation on Mission Editing in this game. As it is (being new to modding ArmA2) it is extremely difficult to find what you need.

I can't get briefings to work for the life of me!

Scillion
Jun 29 2009, 06:00
for some more info (including how to put a picture in your briefing)

http://www.ofpec.com/forum/index.php?topic=33468.0

R34P3R
Jun 30 2009, 21:29
if a player respawn he must click first on PLAYERS before the Missions shotup.. is this a ARMA2 Bug or Script Error ?

I have include the player_respawn...



sleep playerRespawnTime;
[] execVM "briefing.sqf";
[] execVM "briefing_update.sqf";

camus25555
Jul 2 2009, 17:29
how do we hide mission objectif in init.sqf now? because it seems that "1" objStatus "HIDDEN"; from arma doesn't work anymore

edit:
finally found the answer you don't use "1" objStatus "HIDDEN" in arma2
you just create an activation to create your task in editor

example no task in briefing at the beginning of the mission

you put this in a trigger or waypoint:
tskdelta = player createSimpleTask["Contacter la Team Delta"]; tskdelta setSimpleTaskDescription["Contacter la Team Delta", "Contacter la Team Delta", "Contacter la Team Delta"]; tskdelta setSimpleTaskDestination (getMarkerPos "obj1");

and this ll add a task :)

Uzii
Jul 2 2009, 18:55
This sounds obvious , and I've probably missed it somewhere, but how do you check if a task is completed? I've tried a trigger:

succeeded=(taskstate task1aa)But it doesn't work. It looks wrong but I couldn't get it to accept anything else.

Edit: It was easy in the end.. just missed this one on the wiki:

taskCompleted task

Starlight
Jul 2 2009, 21:14
Edit: It was easy in the end.. just missed this one on the wiki:

taskCompleted task

Ok being stupid here, does this trigger the green filled in tick box in the task list?

And where are you placing this scrip, in the trigger?
I am using the following trigger info

Condition: not alive Tungst1
On Act: nul = [objNull, ObjNull, Task2a, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";

This triggers a message to say theask is complete but the briefing document does not complete. Love to know more on your info please.

Uzii
Jul 2 2009, 23:20
Ah, the one I posted was to check if a task was completed, say after 3 tasks are done, it would then show the fourth. In a trigger:
taskCompleted task1 AND taskCompleted task2 AND taskCompleted task3;
Then in the activation field:

[] execVM "FOURTH_TASK.sqf"

But what you need is at the bottom of the first post:

TASK_NAME setTaskState "SUCCEEDED"
That will 'tick' it off the tasks menu on the map screen, then you add the hint line you have after it, and it will hint the task is completed, and tick it off. I think... ;)

Puffins
Jul 3 2009, 07:36
Is it possible to have one task link to several objectives using

taskname setSimpleTaskDestination (getMarkerPos "taskmarker");?

The reason I ask is because I have a mission where you are supposed to clear 3 small camps, but I don't want to clog up the taskjournal with one task for each camp, when it's just much more 'pretty' to have them all in one.

Inkompetent
Jul 3 2009, 08:00
You can only have one task marker (that shows as waypoint), but you can have links to several markers in the task description with:
<marker name='objX'>TEXT</marker>

Puffins
Jul 3 2009, 08:03
You can only have one task marker (that shows as waypoint), but you can have links to several markers in the task description with:
<marker name='objX'>TEXT</marker>

Ahhh, bummer :(

Dan86
Jul 4 2009, 16:18
Does any one know to create multi-language briefing? I looked for it but i didnt found any thing.

Buliwyf
Jul 4 2009, 16:48
Does any one know to create multi-language briefing? I looked for it but i didnt found any thing.

Yes...

My Briefing.sqf:


task1 = player createSimpleTask [localize "GDT_task1_title"];
task1 setSimpleTaskDescription [localize "GDT_task1_text", localize "GDT_task1_title", localize "GDT_task1_hud"];
player setCurrentTask task1;

_diary = player createDiaryRecord ["Diary", [localize "GDT_info_title", localize "GDT_info"]];

My Stringtable.csv (in root of your mission folder):

LANGUAGE,German,English

GDT_info_title, "Information", "Information"
GDT_info, "<br />Eure Ausrüstung findet ihr in den Munitionskisten an eurer <marker name=""start"">Ausgangsposition</marker>.<br /><br />Findet den Laserdesignator und synchronisiert ihn auf dem Funkturm mit dem Satelliten.<br /><br />Der Space Based Laser braucht 45 Sekunden um aufzuladen.<br /><br />Sämtliche Ziele sind auf eurer Einsatzkarte markiert!", "<br />Get your equipment out of the ammocrates at your <marker name=""start"">Insertion Point</marker>.<br /><br />Find the laserdesignator and sync it with the satellite on top of the radio tower.<br /><br />The Space Based Laser needs 45 seconds for recharging.<br /><br />All targets are marked on your map!"


GDT_task1_title, "Findet den Laserdesignator", "Find laserdesignator"
GDT_task1_text, "<br />Im Camp <marker name=""Laserdesignator"">ALPHA</marker> verstecken die Feinde einen Laserdesignator. Bringt ihn in euren Besitz!", "<br />The enemy have hidden a laserdesignator in camp <marker name=""Laserdesignator"">ALPHA</marker>. Bring it in your possession!"
GDT_task1_hud, "Camp ALPHA", "Camp ALPHA"

;)

Dan86
Jul 4 2009, 18:20
Great, exactly what i was looking for. Looks pretty simple and clear. Will check it ASAP i get to my home.

Thanks Buliwyf

Ok i have another question:

Any idea on placing Images in Brief?
I cannot use old style Arma html codes to place an image in sqf offcourse. Is there any workaround?

R34P3R
Jul 5 2009, 09:28
is there anyway to remove a task ?

zipman
Jul 5 2009, 21:12
thanks this is very helpful as i couldnt work it out at all now have it working i think, just for basic briefing

Redfield-77
Jul 6 2009, 02:17
What if you could just do all the briefing stuff in the editor and did not need a degree in C++ to make an enjoyable mission. :rolleyes:

kylania
Jul 6 2009, 02:20
Yeah, this new briefing thing seems overly complicated. While it seems to have more flexibility, without some kind of wizard or tutorial in the editor it's very clumsy to use.

Redfield-77
Jul 6 2009, 03:02
Yeah, this new briefing thing seems overly complicated. While it seems to have more flexibility, without some kind of wizard or tutorial in the editor it's very clumsy to use.


Actually the way it was done in Arma was more than flexable enough to do what you want. There was also a nice tool for doing it quick and painless. Changing the way it is done just alienates some creative people wich equals fewer quality missions from the community.

El Mariachi
Jul 6 2009, 13:56
I really hope someone does create a wizard for this. I am sure eventually I'll get used to the setup of the new briefing, but the Arma Edit briefing wizard made things so much easier and since the script has to be an sqf anyway, I'll definitely be waiting for some word that someone creates a briefing wizard.

Other than that, I will have to figure out this tskobj stuff and hope its tying in correctly.

If i do add images to the file, do i have to specify them in the description.ext too or just have the jpg somewhere in the pbo?

Ghost
Jul 6 2009, 13:59
I really hope someone does create a wizard for this. I am sure eventually I'll get used to the setup of the new briefing, but the Arma Edit briefing wizard made things so much easier and since the script has to be an sqf anyway, I'll definitely be waiting for some word that someone creates a briefing wizard.

Other than that, I will have to figure out this tskobj stuff and hope its tying in correctly.

If i do add images to the file, do i have to specify them in the description.ext too or just have the jpg somewhere in the pbo?


put the image in your missions\missionname folder. they are not specified in the description.ext file, but in the briefing script. use the old code way for adding the picture

Dan86
Jul 6 2009, 14:23
Well i tried it like that:

player createDiaryRecord ["Diary", ["Photo", "Yesterday", <img src="uav1.jpg" width="135" height="75">]];

is a part of briefing.sqf, but everything is working and the picture is not there where its supposed to be.

On the http://community.bistudio.com/wiki/Overview_Picture they wrote:

"Define the overview.html (we not use it anymore in a2)
In your overview.html you need to call the image via an HTML tag"

will HTML code work in sqf?!

Ghost
Jul 6 2009, 14:31
player createDiaryRecord["Diary", ["Info", "<br/>Author - Ghost<br/>Version 3<br/><br/><img image='ghost.paa'/>"]];

thats what i have in my missions and all works great!

Dan86
Jul 6 2009, 16:11
Ok that helped me a lot, now its almost working


player createDiaryRecord ["Diary", ["Photo", "Yesterday <br/><br/> Intel <br/><img image='uav1.paa'/>"]];

but i encounter next problem, when img is loading to display in brief message coming up that "cannot load mipmaps..."

what options did you set in paa plugin to have it working, i tried with mipmaps/no mipmaps-still error, change img res-still nothin, dxt5/auto-same error...:confused:

DaanVS
Jul 6 2009, 16:15
Is it possible to not have the destination marker actually show still keep the wapoint for when the task is selected?

Ghost
Jul 6 2009, 17:55
Ok that helped me a lot, now its almost working

but i encounter next problem, when img is loading to display in brief message coming up that "cannot load mipmaps..."

what options did you set in paa plugin to have it working, i tried with mipmaps/no mipmaps-still error, change img res-still nothin, dxt5/auto-same error...:confused:

I just used ArmA tools Text View 2. Seemed to work for me.

CarlGustaffa
Jul 7 2009, 00:40
What kind of tags are supported? Can we use i.e. preformatted text, or parseText or whatever for this?

Dan86
Jul 7 2009, 08:43
Looks like parseText working for adding the image, so it should be working.

Pundaria
Jul 10 2009, 05:34
createDiaryRecord
createSimpleTask
setSimpleTaskDescription
setSimpleTaskDestination
setTaskState


Where do I type these stuff????? wordpad?

Redfield-77
Jul 10 2009, 05:37
createDiaryRecord
createSimpleTask
setSimpleTaskDescription
setSimpleTaskDestination
setTaskState


Where do I type these stuff????? wordpad?

create new text document.

VanhA-ICON
Jul 10 2009, 05:38
createDiaryRecord
createSimpleTask
setSimpleTaskDescription
setSimpleTaskDestination
setTaskState


Where do I type these stuff????? wordpad?
Either that or use this:
ArmA edit (http://www.armaholic.com/page.php?id=1455)

Pundaria
Jul 10 2009, 08:08
Where do I place the txt. file?

PRiME
Jul 10 2009, 08:19
Re-read this thread! Don't be lazy.

VanhA-ICON
Jul 10 2009, 08:21
Where do I place the txt. file?

Check the first post in this topic.

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";

Just rename the txt as sqf and place it under your mission folder.

Pundaria
Jul 10 2009, 11:03
thx guys

Pundaria
Jul 11 2009, 02:43
My file is from ARMA edit which is a briefing file. I named it "briefing" and I put it in a file called "briefing.sqf" inside the mission file.

And I write execVM "briefing.sqf" in the "init.sqf"(created by myself) that I put also inside the mission file.

Pressing Shift+preview shows fail to load the script briefing.sqf

. Dudes, help...:butbut:

Did I misunderstand something?

Cellus
Jul 11 2009, 07:45
I have a briefing half-working in MP. I have


switch (side player) do
{
case west:
{ etc.
}
case east:
{etc.
}
}


which causes the marines to have their briefing, but nothing for the Russians. Any ideas?

Ed: ah, just needed ; between cases

Pundaria
Jul 11 2009, 11:56
I can only read my written tasks and notes in editor... For starting the mission in sp mission, no notes can be read... I placed it under my mission folder

Durka-Durka
Jul 12 2009, 04:06
Hey I really appreciate the work the OP and others put out there to help those who want to make briefings, but I'm a beginner at this stuff and the original howto seems to require previous knowlege of making briefings and such.

Is there a tutorial out there that walks us through the whole process from start to finish on how to make briefings in basic terms, explaining step-by-step how this works? For instance, I've been reading this over and over and it took me an hour just to figure out what the init.sqf file was, how to make it and where to put it. And now I'm still not sure, as I haven't read anything so far that explains it. That's not to mention the actual briefing file itself. No disrespect to the OP, as he's helped a lot of people, but my newbiness needs to figure this out in a simple manner :) Thanks for any input.

Redfield-77
Jul 12 2009, 06:36
Hey I really appreciate the work the OP and others put out there to help those who want to make briefings, but I'm a beginner at this stuff and the original howto seems to require previous knowlege of making briefings and such.

Is there a tutorial out there that walks us through the whole process from start to finish on how to make briefings in basic terms, explaining step-by-step how this works? For instance, I've been reading this over and over and it took me an hour just to figure out what the init.sqf file was, how to make it and where to put it. And now I'm still not sure, as I haven't read anything so far that explains it. That's not to mention the actual briefing file itself. No disrespect to the OP, as he's helped a lot of people, but my newbiness needs to figure this out in a simple manner :) Thanks for any input.

// last created entries go on top, so reverse the order
// <marker name='obj1'>here</marker>//
//<img image='shilk.paa'/>//

// create a simple note in the briefing
player createDiaryRecord["Diary", ["Oleg V. Takarov", "<img image='olegphoto.paa'/><br/>Oleg Vidaly Takarov<br/>AKA Kowmap<br/><br/>DOB 6-17-73<br/>"]];

player createDiaryRecord["Diary", ["ROE", "You are weapons free for the duration of the operation.<br/>Try to use your best judgement Red-Tide and avoid any international incidents."]];

player createDiaryRecord["Diary", ["Situation", "XXXXX"]];
player createDiaryRecord["Diary", ["Mission Overview", "XXXXX"]];


// <br/> is a line break, forcing the text behind it to go on a new line

// create a task



tsk3 = player createSimpleTask["Extraction"]; // adds a task w/o desc or marker
tsk3 setSimpleTaskDescription["Make your way to the USS Everon offshore for extraction.", "Extraction", "USS Everon"];
tsk3 setSimpleTaskDestination (getMarkerPos "extraction"); // make sure you've added a marker!

tsk4 = player createSimpleTask["Stockpile"]; // adds a task w/o desc or marker
tsk4 setSimpleTaskDescription["Locate Takarovs weapon stockpile and destroy it. If it is not destroyed the next person to find it may be worse than Takarov.", "Destroy Stockpile", "Stockpile"];

tsk2 = player createSimpleTask["Arms Deals"]; // adds a task w/o desc or marker
tsk2 setSimpleTaskDescription["Collect Takarovs Laptop containing recent arms deals.", "Takarovs Clients", "laptop"];

tsk1 = player createSimpleTask["Capture Takarov"]; // adds a task w/o desc or marker
tsk1 setSimpleTaskDescription["Search Utes for the Arms Dealer, Oleg V. Takarov.", "Capture Takarov", "tak"];


This is from the mission im currently working on. Copy and paste it into a .txt file named briefing.txt

Change the file extension from .txt to .sqf (Now you have a briefing.sqf)

Make another sqf. file named init.sqf and paste: [] execVM "briefing.sqf" into it.

drop these 2 files into any mission folder and you will see how it works. Then just change it to whatever you need.

You will get an error about the missing image because you dont have it in your mission folder but it wont be a showstopper. Just use the template and youll figure it out.

Part 2

Make a mission in the editor drop 1 bluforce unit as the player. make a trigger a few meters away from it with the conditions BLUFOR is present. In the On Activation field of the trigger type:

tsk4 setTaskState "SUCEEDED"; hint "Stockpile Destroyed"; Save the mission. Drop the 2 sqf. you just made into the mission folder.

Go back into the editor.

Preview the mission and walk into the trigger area. You should get the hint message "Stockpile Destroyed" and the little box next to the Task will be checked off.

Thats how it all works. I hope that is step by step enough to understand. I am new to the editing part of Arma too so I try to help when I can.

kylania
Jul 12 2009, 09:10
tsk4 setTaskState "SUCEEDED"; hint "Stockpile Destroyed";

To get the pretty Task Hint messages use the following:


tsk4 setTaskState "SUCCEEDED";
[objNull, objNull, tsk4, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";

http://img141.imageshack.us/img141/1043/taskstatus.png

Durka-Durka
Jul 12 2009, 15:29
Redfield, thanks a lot! I will try that out today and see if it works for me.

EDIT: That worked like a charm, now I just gotta figure out what to edit and where. Thanks again!

Wiggum
Jul 12 2009, 17:03
I worked my way through all the pages here an tested some stuff allready and if i keep it simple...it works.

But two thinks i did not get to work.

1. Has anyone a full MP compatible briefing.sqs with the following:

- Some space for diary stuff.
- One task that is active at mission start
- Another task that is activatet when you finish task one.
- All with that pretty Task Hint messages

2. Is there a way to remove the SOM Description in the diary (only ingame) that comes when you use the SOM Module in your mission ?

Thanks for help !

Redfield-77
Jul 12 2009, 20:24
Redfield, thanks a lot! I will try that out today and see if it works for me.

EDIT: That worked like a charm, now I just gotta figure out what to edit and where. Thanks again!

No problem, glad I could help. Kylania was a big help for me. All I did was take his template and translate it to a begginer explanation.

EDIT: BTW this has never worked for me.

tsk4 setTaskState "SUCCEEDED";
[objNull, objNull, tsk4, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";
Im not sure why, thats why I just use hints.

EDIT2: OK nvm I got it to work. it should be:

tsk4 setTaskState "SUCCEEDED";
nul = [objNull, objNull, tsk4, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";

SEAL84
Jul 13 2009, 02:21
For clarity's sake I'll point something out that I didn't realize because I'm stoopid:

Even though briefing.html no longer contains any information used in the actual briefing, if you don't have at least a template of it in your missions folder, the pre-mission briefing won't display.

I was testing out the new tasks and notes system and creating a mission that would sorta serve as a template for later use. I put all that stuff in and I figured I'd put a placeholder gear selection in just to have all this stuff ready to roll when I need it for a real mission. I figured that if briefing.html only contains the de-briefings, I could take care of it last. I fill out the description.ext, hold Shift + "Preview" and I'm standing on the map...hmmmm. I pasted the briefing template from the OP in, tried again, and voila, there was the pre-mission briefing and gear selection.

So, even though briefing.html doesn't have anything to do with the briefing anymore, it must be in there for the briefing/gear selection/tasks/etc. to show up. Hopefully that saves somebody a few minutes of head-scratching.

And for new players, hold shift and click "preview" in the editor to see your briefing in-game.

Mr Burns
Jul 13 2009, 16:47
I never learned any programming language other than some BASIC about 15 years ago, it´d be right to say that i don´t know shit about this stuff.
Now that BI have chosen to destroy all of our hard earned knowledge in .html briefing´s (assuming you´re equally stupid like me) it´s hell all over again. Briefing.sqf = WTF !

I´ve spent hours & days to somehow steal my way through other missions, also reading the tutorials from here and the german community to make a working brieifng.sqf ... and on the first glance it appears to be working.
But, how do you keep the briefing.sqf from disappearing after a playerunit respawned or got revived?

It´s not like all gamers are geniouses in .sqf goddammit! How are mortals like us supposed to have fun with the editor when there´s stumbling stones and road bumps all over it. Took me since OFP to understand at least enough to make basic but entertaining missions, and now i cannot even do a simple briefing anymore :confused:

To make a long story short: Anyone found out a foolproof way to keep briefing after players respawned/revived?


PS: Yes, i am pretty pissed :mad:

Durka-Durka
Jul 13 2009, 19:18
Why they don't have a simple screen to type in a briefing in the editor in the first place is beyond me.

Wiggum
Jul 13 2009, 19:28
Ok, problem is gone.. ;)

SEAL84
Jul 13 2009, 20:04
stuff

I found this last night:

http://forums.bistudio.com/showpost.php?p=1355756&postcount=11

Mr Burns
Jul 13 2009, 21:01
I found this last night:

http://forums.bistudio.com/showpost.php?p=1355756&postcount=11

That´ll help! thx mate :bounce3:



Still, BI should be ashamed that we basically have to hack solutions :mad:


edit: Didn´t work.

Mr Burns goes into meltdown mode

..and wants the [me] tag back :turn:



server execVM "revive_init.sqf";
nil = [] execVM "briefing.sqf"
skiptime Param1;
if(true) exitWith {};



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

switch (side player) do
{
case EAST: // REDFOR briefing goes here
{
_diary4 = player createDiaryRecord ["Diary", ["Objective 4", "Fall back to the <marker name=""ta4"">church</marker> in Pustoshka.<br/><br/><img image='p\c.paa'/><br/><br/>Set up defenses and defend yourselfes until a 13th Mot.Reg. patrol arrives to get you out of there."]];
_diary3 = player createDiaryRecord ["Diary", ["Objective 3", "Find and destroy a downed MI-8 <marker name=""ta3"">somewhere near Myshkino</marker>. The insurgents must not get their filthy hands on our hardware."]];
_diary2 = player createDiaryRecord ["Diary", ["Objective 2", "We have reports of an insurgent mortar section <marker name=""ta2"">in Lopatino</marker>. Find it and destroy the mortar tubes."]];
_diary1 = player createDiaryRecord ["Diary", ["Objective 1", "Seize <marker name=""ta1"">the old factory</marker> at Lopatino and hold off any counterattacks.<br/><br/><img image='p\f.paa'/><br/><br/>The rebels are popular in this region. You might encounter strong and well organized mobile forces aswell as hostile civilians."]];

task1 = player createSimpleTask ["Objective 1"];
task1 setSimpleTaskDescription ["Seize the factory and defeat any possible counter attacks.","Objective 1","Seize & Hold"];
task1 setSimpleTaskDestination markerpos "ta1";

player setCurrentTask task1;
[objNull, ObjNull, task1, "CREATED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";
waitUntil { taskState task1 == "Succeeded"; };
[objNull, ObjNull, task1, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";
sleep 4;

task2 = player createSimpleTask ["Objective 2"];
task2 setSimpleTaskDescription ["Destroy the Mortar section in Lopatino.","Objective 2","Destroy Mortars"];
task2 setSimpleTaskDestination markerpos "ta2";
task2 settaskstate "Created";

player setCurrentTask task2;
[objNull, ObjNull, task2, "CREATED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";
waitUntil { taskState task2 == "Succeeded"; };
[objNull, ObjNull, task2, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";
sleep 4;

task3 = player createSimpleTask ["Objective 3"];
task3 setSimpleTaskDescription ["Find & destroy a downed MI-8 somewhere near Myshkino. The insurgents must not get their filthy hands on our hardware! We have reports of a local bike vendor, see if you can find something useful in his <marker name=""bikes"">garden</marker>","Objective 3","Destroy Mi-8 wreck"];
task3 setSimpleTaskDestination markerpos "ta3";
task3 settaskstate "Created";

player setCurrentTask task3;
[objNull, ObjNull, task3, "CREATED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";
waitUntil { taskState task3 == "Succeeded"; };
[objNull, ObjNull, task3, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";
sleep 4;

task4 = player createSimpleTask ["Objective 4"];
task4 setSimpleTaskDescription ["Fall back to the church in Pustoshka and wait for 13th Mot.Reg. coming to your extraction.","Objective 4","Fall back to Church"];
task4 setSimpleTaskDestination markerpos "ta4";
task4 settaskstate "Created";

player setCurrentTask task4;
[objNull, ObjNull, task4, "CREATED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";
waitUntil { taskState task4 == "Succeeded"; };
[objNull, ObjNull, task4, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";
sleep 4;
};
};



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];
};


Any ideas?

I´d nag Terp instead of you guys, but he´s also like > . < that close before going into meltdown too :notify:

Wiggum
Jul 14 2009, 14:54
I have some problems with tasks that are created during mission with a trigger.

I have two tasks:
task1 is in the briefing.sqf


// 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", ["Lage", "Utes ist eine kleine, seit mehreren Jahren unbewohnte, Insel. Zentral gelegen ist ein Flugfeld das von den Aufständischen genutzt wird. Vor kurzem haben die Russen zwei moderne TUNGUSKA Flugabwehrpanzer an die Aufständischen geliefert, diese sind aber laut unseres Geheimdienstes noch nicht einsatzbereit."]];
player createDiaryRecord["Diary", ["Auftrag", "Sie werden um 5:30 Uhr auf Utes landen. Zerstören Sie die beiden TUNGUSKA Flugabwehrpanzer und töten Sie so viele Aufständische wie möglich. Sie können jederzeit einen Hubschrauber zur Evakuierung anfordern."]];

//>---------------------------------------------------------<
// Secondary Objective


//>---------------------------------------------------------<
// Primary Objective
task1 = player createsimpletask["Flugabwerhpanzer zerstören"];
task1 setSimpleTaskDescription["...muss man dazu noch etwas sagen ?", "Flugabwehrpanzer zerstören", "Flugabwehrpanzer zerstören"]; task1 setSimpleTaskDestination (getMarkerPos "zone1");
};


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];
};

task2 is created with a trigger

task2 = player createSimpleTask ["Radaranlage zerstören"]; task2 setSimpleTaskDescription ["Ups, das hätten wir fast vergessen. Befehligen Sie einen Luftschlag auf die Radaranlage.","Radaranlage zerstören","Radaranlage zerstören"]; task2 setSimpleTaskDestination markerpos "zone2"; task2 setTaskState "Created"; nul = [objNull, ObjNull, task2, "CREATED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf ";

Task2 can only show of if task1 is completed !
But if task2 shows of i no longer see task1...
And if task2 is completed i see both BUT task 1 is no longer shown as completed !

What did i do wrong ?
Or is there a better way to let task2 show of if task1 is completed ?

Gaffa
Jul 14 2009, 22:00
Hi all,

I seem to be having a problem with my mission and tasks...

The mission and tasks work great once you have completed them however, here's the problem:

I have a main trigger that activates 4 triggers which create smoke for a evac.

Main trigger -

Activation: none

Condition: taskCompleted tskEvidence1 and taskCompleted tskEvidence2 and taskCompleted tskEvidence3 and taskCompleted tskEvidence4

On act: trigger1=true

Now each of the 4 triggers have this -

Activation: none

Condition: trigger1

on act: this just creates a smoke grenade

Now, the problem I'm having is that the 4 triggers are activating as soon as the mission starts? Surely all 4 triggers should wait for trigger1 to become true?

I also have a evac chopper that lands between the 4 smoke grenades and the first move waypoints condition is: trigger1

So the chopper should also wait until trigger1 is set to true? But this doesn't happen either. :(

any ideas?

SEAL84
Jul 14 2009, 22:29
server execVM "revive_init.sqf";
nil = [] execVM "briefing.sqf"
skiptime Param1;
if(true) exitWith {};


You missed a ";" at the end of the second line. I think that should do it.

Erskin71
Jul 15 2009, 02:19
I have the briefing.sqf working. However in the game everything is double.

Task----> Task 1
Task 2
Task 3
Task 1
Task 2
Task 3

same for notes and diary. I think I used Redfield-77's code but I've used other code in this thread and have the same problem. Ideas?

// last created entries go on top, so reverse the order
// <marker name='obj1'>here</marker>//
//<img image='shilk.paa'/>//

// create a simple note in the briefing
player createDiaryRecord["Diary", ["Oleg V. Takarov", "<img image='olegphoto.paa'/><br/>Oleg Vidaly Takarov<br/>AKA Kowmap<br/><br/>DOB 6-17-73<br/>"]];

player createDiaryRecord["Diary", ["ROE", "You are weapons free for the duration of the operation.<br/>Try to use your best judgement Red-Tide and avoid any international incidents."]];

player createDiaryRecord["Diary", ["Situation", "XXXXX"]];
player createDiaryRecord["Diary", ["Mission Overview", "XXXXX"]];


// <br/> is a line break, forcing the text behind it to go on a new line

// create a task



tsk3 = player createSimpleTask["Extraction"]; // adds a task w/o desc or marker
tsk3 setSimpleTaskDescription["Make your way to the USS Everon offshore for extraction.", "Extraction", "USS Everon"];
tsk3 setSimpleTaskDestination (getMarkerPos "extraction"); // make sure you've added a marker!

tsk4 = player createSimpleTask["Stockpile"]; // adds a task w/o desc or marker
tsk4 setSimpleTaskDescription["Locate Takarovs weapon stockpile and destroy it. If it is not destroyed the next person to find it may be worse than Takarov.", "Destroy Stockpile", "Stockpile"];

tsk2 = player createSimpleTask["Arms Deals"]; // adds a task w/o desc or marker
tsk2 setSimpleTaskDescription["Collect Takarovs Laptop containing recent arms deals.", "Takarovs Clients", "laptop"];

tsk1 = player createSimpleTask["Capture Takarov"]; // adds a task w/o desc or marker
tsk1 setSimpleTaskDescription["Search Utes for the Arms Dealer, Oleg V. Takarov.", "Capture Takarov", "tak"];

Brute
Jul 16 2009, 01:10
player createDiaryRecord["Diary", ["Chernarus", "Command have issued us with orders to secure and hold the small town of Pavlovo, north west of Chernogorsk. According to intelligence increasing numbers of Spetsnaz units have been spotted in the area, suggesting the small town may be a retreat point for Russian forces."]];
player createDiaryRecord["Diary", ["Chernarus", "On July 16, 1945, after the successful detonation of the first nuclear weapon Oppenheimer said, "Now I am become Death, the destroyer of worlds.". Only now am I beginning to understand those words, understand the true cost of war, the destruction of man's collective soul. The USMC managed to take Chernogorsk and Elektrozavodsk in a matter of hours with little bloodshed, the defending Russian troops were poorly equipped and swiftly surrendered or retreated into the neighboring forests/villages to regroup. I would imagine that tomorrow we will be in close pursuit of them, giving them little to no oppertunity to mount any real offensive."]];
player createDiaryRecord["Diary", ["Chernarus", "The USMC have, with the breakdown of the peace process, have been ordered to secure Chernarus's two main costal cities, Chernogorsk and Elektrozavodsk. Razor Team. along with other force recon teams, have been ordered to assist with the disabling of a main communications tower north of Chernogorsk."]];

Only the last entry actually appears, the rest seem to get discarded?

kylania
Jul 16 2009, 01:30
Brute, it's because you use the same Record name in each of the entries. The "Chernarus", part describes the name of the entry, so has to be unique.

Brute
Jul 16 2009, 01:36
Brute, it's because you use the same Record name in each of the entries. The "Chernarus", part describes the name of the entry, so has to be unique.

I changed them to all be the same after i discovered they were not working as i intended. I will try again though.

Cellus
Jul 16 2009, 03:03
Gaffa, that has nothing to do with the briefing, but add
trigger1=false
to your init.sqf


I have the briefing running for all players, but it resets at spawn. How do I make it keep current mission objective on spawn, and display failed/succeded at mission end?

Brute
Jul 17 2009, 20:07
I have namd them all different things but only the last one shows up still

---------- Post added at 09:07 PM ---------- Previous post was at 08:11 PM ----------

player createDiaryRecord["Diary", ["Assult of Pavlovo", "Command have issued us with orders to secure and hold the small town of Pavlovo, north west of Chernogorsk. According to intelligence increasing numbers of Spetsnaz units have been spotted in the area, suggesting the small town may be a retreat point for Russian forces."]];
player createDiaryRecord["Diary", ["The war begins", "On July 16, 1945, after the successful detonation of the first nuclear weapon Oppenheimer said, "Now I am become Death, the destroyer of worlds.". Only now am I beginning to understand those words, understand the true cost of war, the destruction of man's collective soul. The USMC managed to take Chernogorsk and Elektrozavodsk in a matter of hours with little bloodshed, the defending Russian troops were poorly equipped and swiftly surrendered or retreated into the neighboring forests/villages to regroup. I would imagine that tomorrow we will be in close pursuit of them, giving them little to no oppertunity to mount any real offensive."]];
player createDiaryRecord["Diary", ["Breakdown of the peace process", "The USMC have, with the breakdown of the peace process, have been ordered to secure Chernarus's two main costal cities, Chernogorsk and Elektrozavodsk. Razor Team. along with other force recon teams, have been ordered to assist with the disabling of a main communications tower north of Chernogorsk."]];

Thats what i have right now and only the "Assault of Pavlovo" one appears, the rest dont.

Imutep
Jul 18 2009, 18:28
Anybody knows the command to delete the markers which are called with this code?


task3 setSimpleTaskDestination markerpos "camp1";
These markers are always visible during the mission. I wanna delete them if the task is completed. Any ideas?

camus25555
Jul 19 2009, 00:34
Anybody knows the command to delete the markers which are called with this code?


task3 setSimpleTaskDestination markerpos "camp1";
These markers are always visible during the mission. I wanna delete them if the task is completed. Any ideas?



this is what im using to delete marker when task is completed

tskzu2 setTaskState "SUCCEEDED"; hint "Le ZU-23 a ete detruit!"; "dca2" setMarkerType "empty";

it make the marker empty so you don't see it on the map

Cellus
Jul 19 2009, 03:21
Anybody knows the command

Bookmark this (http://community.bistudio.com/wiki/Category:Scripting_Commands) page.

Redfield-77
Jul 19 2009, 03:36
@<hidden> Brute,

Take all the quotation marks out that are not part of the code like oppenhiemers famous saying.

Imutep
Jul 19 2009, 09:55
this is what im using to delete marker when task is completed

tskzu2 setTaskState "SUCCEEDED"; hint "Le ZU-23 a ete detruit!"; "dca2" setMarkerType "empty";

it make the marker empty so you don't see it on the map

I mean the orange task3 marker which is set on the empty marker "camp1";

task3 setSimpleTaskDestination markerpos "camp1";
This marker is always visible, also if i set the "camp1" marker as empty. In the Wiki i found also nothing. Maybe search again ^^

Cellus
Jul 19 2009, 11:28
I don't believe you. You seriously didn't find anything for deleting markers? Did you trying searching 'delete' or 'marker'? Because there's an entry called 'deleteMarker'.

Imutep
Jul 19 2009, 13:04
I don't believe you. You seriously didn't find anything for deleting markers? Did you trying searching 'delete' or 'marker'? Because there's an entry called 'deleteMarker'.

You know what this line activate? deleteMarker, deleteMarkerLocal, setMarkerType "empty" ...nothng work ;)

task3 setSimpleTaskDestination markerpos "camp1";

I found a way to delete this orange markers with...

player removeSimpleTask taskname;
But this is'nt optimal, because it delete the task from the briefing. Hmm...

Mike84
Jul 20 2009, 11:07
First of all, 15 pages already!?! I did not expect that :)

Secondly, I've updated the tutorial and the briefing templates, so do check out the first post again.

Thirdly, I've posted my taskHint function (http://www.ofpec.com/forum/index.php?topic=33768.0) at ofpec, do check that out as well.


@<hidden>, 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]

Archamedes
Jul 20 2009, 15:24
This makes no sense to me at all


Ok, let's start with the simple stuff. Make a file called 'briefing.sqf' and make sure this gets executed through the 'init.sqf'. Add the following to your init.sqf:

Make a file where with what? in arma 2, on notepad?

Mike84
Jul 20 2009, 22:37
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.

alext223
Jul 21 2009, 03:50
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.

Imutep
Jul 21 2009, 21:24
@<hidden>, 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.

Muzza
Jul 22 2009, 12:48
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?

dale0404
Jul 22 2009, 13:46
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.

chappy
Jul 24 2009, 15:10
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.

Wiggum
Jul 24 2009, 15:15
Thx Mikey, that's it.

Seams you got it to work...
Can you give a example ?

Imutep
Jul 24 2009, 20:14
No sorry, i don't get it to work. I thought it, but hmm....

konyo
Jul 25 2009, 13:42
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

The Outcast
Jul 25 2009, 13:50
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

Carpaazi
Jul 25 2009, 20:55
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 =)

kylania
Jul 25 2009, 21:16
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 (http://forums.bistudio.com/showthread.php?t=81047) as the sticky says.

Writing Breifings (http://forums.bistudio.com/showthread.php?t=73424)has been covered in detail. Even in multiplayer (http://forums.bistudio.com/showpost.php?p=1355756&postcount=11)...

How to write a mission where you need to recover an evidence file (http://forums.bistudio.com/showthread.php?t=78235) has been covered in detail as well.

Himmelsfeuer
Jul 25 2009, 21:19
Is the MP Task not showing problem after respawn solved with that?

Mike84
Jul 26 2009, 15:23
tskObj1 setSimpleTaskDestination (getMarkerPos "blaaaaa")

and


tskObj1 setSimpleTaskDestination [0,0]


replaces the objective marker without a problem


Can you show me your code imutep?

Imutep
Jul 26 2009, 16:07
Hossa, it works! :)
I tested it with ...

tskObj1 setSimpleTaskDestination (getMarkerPos "MarkerWhoDoNotExist")
But this simple way is the best. Thx Mike

tskObj1 setSimpleTaskDestination [0,0];

Carpaazi
Jul 26 2009, 17:54
Any ideas how i can update marker color/text/type for coop player/JIP/ respawned players?

Carpaazi
Jul 26 2009, 17:59
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.

kylania
Jul 26 2009, 18:27
You need to rerun the briefing.sqf after each respawn.

Carpaazi
Jul 26 2009, 21:22
Im using the briefing.sqf posted by outcast above, but i made some changes and i haven't been able to test it yet

PorkyJack
Jul 27 2009, 10:17
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. :)

horton
Jul 28 2009, 21:59
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.

kylania
Jul 28 2009, 22:02
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.

Mosh
Jul 28 2009, 22:49
Any ideas?

This works for respawning players and briefing (http://forums.bistudio.com/showpost.php?p=1369069&postcount=2). Didn't see this in the previous 17 pages...

Mike84
Jul 29 2009, 00:02
This works for respawning players and briefing (http://forums.bistudio.com/showpost.php?p=1369069&postcount=2). Didn't see this in the previous 17 pages...
Because it has been in my template for quite some time already?

Mr_Centipede
Jul 29 2009, 03:17
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"

Mike84
Jul 29 2009, 09:57
Try

&amp;

Mr_Centipede
Jul 29 2009, 14:29
Try

&amp;

Thanks, that certainly worked. I got another problem, the game didnt start at the briefing, it goes straight to the game. What could possibly go wrong? here's my init.sqf



nul=[] execVM "briefing.sqf";
nul=[] execVM "ACM\ACM_init.sqf";
nul=[] execVM "ACM\ACM_USMC_init.sqf";
nul=[ldr0,["1-1","1-1A","1-1B","1-1C","1-1MG"]] execVM "cent_HCS\cent_HCS_init.sqf";

Obj_Spetz=false;
camp_1=false;
camp_2=false;
camp_3=false;
camp_4=false;

{_x moveInCargo bus} forEach units (group ldr1);
{_x moveInCargo bus} forEach units (group ldr2);
{_x moveInCargo bus_1} forEach units (group ldr3);
{_x moveInCargo bus_1} forEach units (group ldr4);
{_x moveInCargo bus_1} forEach units (group ldr0);

Imutep
Jul 29 2009, 15:02
Try ths one


[] execVM "briefing.sqf";
[] execVM "ACM\ACM_init.sqf";
[] execVM "ACM\ACM_USMC_init.sqf";
[ldr0,["1-1","1-1A","1-1B","1-1C","1-1MG"]] execVM "cent_HCS\cent_HCS_init.sqf";

Obj_Spetz=false;
camp_1=false;
camp_2=false;
camp_3=false;
camp_4=false;

{_x moveInCargo bus} forEach units group ldr1;
{_x moveInCargo bus} forEach units group ldr2;
{_x moveInCargo bus_1} forEach units group ldr3;
{_x moveInCargo bus_1} forEach units group ldr4;
{_x moveInCargo bus_1} forEach units group ldr0;

Mike84
Jul 29 2009, 15:02
Could be a couple of things. It might be a lack of a briefing.html, teh briefing might have been disabled in the description.ext (briefing=0), or something in your HCS might be messing something up.

If that doesn't work, try to comment everything out, and uncomment a line at every try until something breaks.

Mr_Centipede
Jul 29 2009, 15:26
Okay, I dont have description.ext, maybe thats it?

[edit] off topic a bit, but where is my exported mission goes? I looked at Missions folder in ARMA2 folder but its not there, yet ingame, at the scenario menu, its there and playable...

On topic:
just tested with Description.ext in, still no go

Gaffa
Jul 29 2009, 19:31
Sorry posted in wrong topic lol...

Darvo
Jul 31 2009, 21:40
Uhm what is this for beginning post? This is so vague on many points I made the following code:



player createDiaryRecord ["Diary", ["Objective 1", "Your task is to kill the General of the Russian army post here
<br/><br/><br/>Don't fail us or we will lose the WAR!"]];
player createDiaryRecord ["Diary", ["Location", "We have an objective <marker name='Start'>Start</marker> and one <marker name='Kill Officer'>Kill Officer</marker>"]];

KillOfficer = player createSimpleTask ["Kill Officer"];
KillOfficer setSimpleTaskDescription ["Kill the General", "Generals Location", "Generals Position"];
KillOfficer setSimpleTaskDestination (getMarkerPos "Kill Officer");
player setCurrentTask Kill Officer;
KillOfficer setTaskState "SUCCEEDED";
KillOfficer setTaskState "FAILED";
KillOfficer setTaskState "CANCELED";
KillOfficer setTaskState "CREATED";



The name of the officer is General , but how can i make it so that if you kill the General you get a succes?

And i am reading about some sort of trigger i need to make? What is it then?

---------- Post added at 09:40 PM ---------- Previous post was at 08:47 PM ----------

Bump, anyone?

Carpaazi
Jul 31 2009, 22:51
Triggers condition:

!alive general

Triggers on act:

killofficer settaskstate "succeeded"; hint "mission complete"

also i noticed you have flaw here

player setCurrentTask Kill Officer;

the kill officer part is supposed to be the same as the task name, so in your case it should be

player setCurrentTask killofficer;

Darvo
Aug 1 2009, 12:51
Triggers condition:

!alive general

Triggers on act:

killofficer settaskstate "succeeded"; hint "mission complete"

also i noticed you have flaw here

player setCurrentTask Kill Officer;

the kill officer part is supposed to be the same as the task name, so in your case it should be

player setCurrentTask killofficer;

Thanks, it works like a charm :) And did not notice that :)

AliMag
Aug 2 2009, 18:01
Hi,

For new users having some difficulties with basic briefing try this:

http://www.ofpec.com/forum/index.php?PHPSESSID=d3tldv85uih65jjsoatc302un1&topic=33891.0

Very easy to use (read the readme file).

Cheers

Derringer
Aug 5 2009, 21:23
I'm having no luck with tasks and the briefing after patching to 1.02. I can set notes with no problem but tasks won't show up and the briefing won't show up at all. I've tried the step-by-step from this post. I've copied the great script that is posted here as well. I get no errors but tasks and the briefing just won't show up at all.

I have execVM "briefing.sgf"; in my init.sqf so it should be execing. This is my briefing.sqf, maybe I'm dumb and missed something obvious:

player createDiaryRecord ["Diary", ["Title 2", "Isn't whitespace awesome? <br/><br/><br/>Yes it totally is!"]];
player createDiaryRecord ["Diary", ["Title 1", "We have an objective <marker name='tsk1'>here</marker> and one <marker name='tsk1'>there</marker>"]];
tskExample1 = player createSimpleTask ["Task Title 1"];
tskExample1 setSimpleTaskDescription ["Task Message 1", "Task Title 1", "Task HUD Title 1"];
tskExample1 setSimpleTaskDestination (getMarkerPos "tsk1");
tskExample1 setTaskState "SUCCEEDED";
tskExample1 setTaskState "FAILED";
tskExample1 setTaskState "CANCELED";
tskExample1 setTaskState "CREATED";

The only thing that I changed was I created a marker called tsk1, which works in the notes.

Any help please? Yes, they are in the mission folder.

---------- Post added at 04:23 PM ---------- Previous post was at 03:38 PM ----------

Please disregard, I had no idea briefings didn't show up in the editor preview unless you hold Shift when clicking preview.

Shuko
Aug 5 2009, 22:12
Why on Earth are you setting the state of the task in briefing?

Cellus
Aug 7 2009, 13:19
Anyone had problems with this in 1.03? Every time I respawn they are all re-written. So, three objectives, four deaths, I now have those three objectives four times each in tasks. I've tried removing the killed handler. Not sure whether to start on fixing it or just go break something.


Ed: also tried removing it from init.sqf and execing it from an in-game trigger with 'local player' as condition. I'm gonna go cry...

Shuko
Aug 7 2009, 13:29
Anyone had problems with this in 1.03? Every time I respawn they are all re-written. So, three objectives, four deaths, I now have those three objectives four times each in tasks. I've tried removing the killed handler. Not sure whether to start on fixing it or just go break something.

Patch notes:

* Fixed: After respawn in MP, player's tasks, diary content and skills are transferred to the new entity

Haven't done any testing, but I guess you dont need to retask anymore

Mike84
Aug 7 2009, 13:36
I haven't really tested this yet, but if the briefing comes up after respawn automagically in 1.03, then you can delete the part where I add the killed event handler.

If this works as advertised, then yay BIS :yay:

Xtriaden
Aug 7 2009, 16:54
@<hidden> Mike84 thanks, with your help I did have my Briefing and Task working before 1.03 Patch. I remove every thing below // run this file again when respawning (only setup the killed EH once though) // to stop it from adding a new Briefing after death, but now I get no briefing after death (or Multi-Briefing if I keep things as they where).

So am I missing something?
Dose anyone have this working right after Patch 1.03?
Do I need to add the briefing to all group members or is there some other trick.
Driving me Mad as all the working missions I had are now broke lol.

dale0404
Aug 7 2009, 17:27
Gents, I took out the event handler at the end of the briefing.sqf and it works perfectly. Looks like BIS fixed it!

Xtriaden
Aug 7 2009, 18:00
I thought I had remove the Event Handler? Still not working for me... any chance of you uploading me your template Dale0404?

dale0404
Aug 7 2009, 18:03
Here you are mate:


* 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", ["*Defend this position!", "*Eliminate enemy forces attacking your location, defend your sector!*"]];
* - 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'>Defend 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 };
waitUntil { player == player };



switch (side player) do
{

case WEST: // BLUFOR briefing goes here
{

player createDiaryRecord ["Diary",["Objectives","Carry out the Objectives in order. Once an objective is done move to the next one. There may still be enemy around however..."]];
player createDiaryRecord ["Diary",["Overview","The Russians are being a pain in the backend. They are trying to setup a foothold on the East side of the Country around the area of <marker name='p2'>Dolina.</marker>"]];


tskEvidence6 = player createSimpleTask ["Get the Hell out of there!"];
tskEvidence6 setSimpleTaskDescription ["Gents, get home <marker name='end'>now!</marker>", "Time for Coffee", "Coffee Time!"];
tskEvidence6 setSimpleTaskDestination (getMarkerPos "end");
player setCurrentTask tskEvidence6;


tskEvidence5 = player createSimpleTask ["Kill the Commander"];
tskEvidence5 setSimpleTaskDescription ["Gents, kill this bloke in the town of <marker name='boss'>Berezino </marker>and we are home free. Vladimir_Fickoffski is the local Commander. Once we kill him the rest of the Russian forces will be dealt a severe morale blow which is good for us. He is somewhere in the town of Berezino. Where exactly? We dont know.", "Time to kill the Twit!", "Twit needs to die."];
tskEvidence5 setSimpleTaskDestination (getMarkerPos "boss");
player setCurrentTask tskEvidence5;


tskEvidence4 = player createSimpleTask ["Destroy the Artillery Radar."];
tskEvidence4 setSimpleTaskDescription ["The Radar is in this <marker name='p3'>area.</marker> Ok, this is a biggie. We may need satchels to destroy the Radar. Also the area is heavily defended.", "Destroy the Radar", "Destroy radar."];
tskEvidence4 setSimpleTaskDestination (getMarkerPos "p3");
player setCurrentTask tskEvidence4;


tskEvidence3 = player createSimpleTask ["Destroy the Light Vehicle Factory."];
tskEvidence3 setSimpleTaskDescription ["The Factory is in the town of <marker name='p2'>Dolina.</marker> Unless we want a whole lot of UAZs on our arse we have to disable the factory by destroying it.", "Destroy the Factory", "Destroy factory"];
tskEvidence3 setSimpleTaskDestination (getMarkerPos "p2");
player setCurrentTask tskEvidence3;


tskEvidence2 = player createSimpleTask ["Destroy the UAV Terminal."];
tskEvidence2 setSimpleTaskDescription ["The Terminal is in the town of <marker name='p1'>Msta.</marker> To stop the enemy from getting the drop on us, we must take it out. According to the plans we recovered the UAV will be operational soon.", "Destroy the UAV Terminal", "Destroy Terminal"];
tskEvidence2 setSimpleTaskDestination (getMarkerPos "p1");
player setCurrentTask tskEvidence2;


tskEvidence1 = player createSimpleTask ["Find evidence."];
tskEvidence1 setSimpleTaskDescription ["In the Town of <marker name='evi'>Pusta.</marker> the Local Commander has left some Top Secret Plans, we must retrieve them. The area is not heavily defended so we may be able to sneak in and get the plans without alerting the enemy.", "Find the Secret Plans.", "Search for the Secret Plans and retrieve them."];
tskEvidence1 setSimpleTaskDestination (getMarkerPos "evi");
player setCurrentTask tskEvidence1;
};


case EAST: // REDFOR briefing goes here
{


};


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


};


case CIVILIAN: // CIVILIAN briefing goes here
{


};
};

Xtriaden
Aug 7 2009, 18:39
Thank Dale0404,
I tried slipping your template into my mission with no luck, so i went as Basic as possible with just briefing.html, briefing.sqf, description.ext, init.sqs. and 2 Players on group respawn.
Still no luck, Starting to think I might need to re-install the game or something.
heres a link to the Test Mission http://rapidshare.com/files/264835207/JustPlayer.Chernarus.zip (that dose not show briefings after death). Maybe someone can try this thing and see if they get Briefings after death :-)

dale0404
Aug 7 2009, 18:47
I see that your using a init.sqs instead of init.sqf?

Also in my init.sqf I have:

execVM "briefing.sqf";

and in your init.sqs you have:

nul=[] execVM "briefing.sqf";

Maybe thats the difference?

Shuko
Aug 7 2009, 21:39
People really need to stop using sqs. Or at least writing code in sqf format into sqs files. ;)

Ghost
Aug 7 2009, 22:32
I have not been able to test this but what about task completion especially with JIP. Does the game update the status of a task in those situations or are scripts/eventhandlers needed still for this?

dale0404
Aug 8 2009, 12:13
Gents, in my mission the tasks update but only for the person who completes the task. If your not the player who completes the task then the tasks dont update. Any help?

Xtriaden
Aug 8 2009, 13:31
People really need to stop using sqs. Or at least writing code in sqf format into sqs files. ;)

Hi, I seam to be having a problem to get init.sqf file to run at start-up, so I just used init.sqs because it seam to work.

Still not got things working right, but I was getting tired of the problem so kinda give up with it.

Looks like I need to understand JIP and why I cant used Init.sqf before I can even think about getting my briefings working again.

Off topic alittle but JIP is new to me, I did alittle SP/Host Mission writing in OFP but some of the new things like JIP and getting Init.sqf to work I am finding hard to get my head around.

Be nice if someone as a very basic mission with working briefings, Task, init.sqf and JIP (unsure why I need JIP) for us to have alook at. But I will try and do alittle more research.

Shuko
Aug 8 2009, 15:54
Hi, I seam to be having a problem to get init.sqf file to run at start-up, so I just used init.sqs because it seam to work.


I doubt they sold you a special version of the game that doesn't use init.sqf. It's more likely that it doesn't _appear_ to run, if you have it filled with sqs syntax code.

peter1987
Aug 8 2009, 16:23
Hi everybody,

I need help with mission briefing (Arma2).

I have made a first-test-mission. I maked the init.sqf and briefing.sqf files and placed it in the folder of my mission where the mission.sqm can be found (SP missions folder).

The .sqf files has correct and checked syntax. There is no syntax error, sure!

The brifeing doesnt work. Before the mission starts there isnt briefing.

However when playing I press 'M' for the plan and there are the tasks and notes of briefing. So I think that the briefing.sqf works but the init.sqf doesnt work. I tried init.sqs but no change.

And an another interesting thing: if I copy the folder of my mission to MP missions and run in the game as MP mission the briefing before starting is working... So as MP mission there is briefing before starting.


Hmmm... What is this problem, and how to solve how to fix? :confused:

Missions without briefing arent amuzing... :(

Any idea?

1.01 and 1.02 version have the same. (patch havent helped)
Windows Vista Business SP2
(I set the permissions of files to full permission but no change)

Thx,
Peter

Ghost
Aug 8 2009, 16:36
are you running the mission from the editor? if so this has been discussed before. HOLD SHIFT key and press ENTER or click preview.

peter1987
Aug 8 2009, 17:04
No.

First: The holding shift key and press enter or preview dont work too. In Operation Flashpoint it hasnt worked too... :S

When I finished editing I have imported it in single missions. This folder is default in documents\Arma2\missions.

Then I placed it in the Arma2 folder (program files as default) in SPmissions but no change.

I have asked many people but no one knows how to fix. :(

I hope here is someone with the answer.

My Arma2 game was bought in Hungary and it is a hungarian edition (dialogs, menus have been translated). do it matter? (official, legal disc)

Ghost
Aug 8 2009, 17:10
No.

First: The holding shift key and press enter or preview dont work too. In Operation Flashpoint it hasnt worked too... :S

When I finished editing I have imported it in single missions. This folder is default in documents\Arma2\missions.

Then I placed it in the Arma2 folder (program files as default) in SPmissions but no change.

I have asked many people but no one knows how to fix. :(

I hope here is someone with the answer.

My Arma2 game was bought in Hungary and it is a hungarian edition (dialogs, menus have been translated). do it matter? (official, legal disc)

It does work, I use it all the time. As for exporting, In your editor go SAVE then click the drop down menu EXPORT TO SINGLE MISSIONS. That is the easiest and best way to export. Do the same to export to mp only choose multiplayer missions. Then go to scenarios or lan and create new to run either sp or mp mission. If none of that works you messed something up pretty good and need external eyes to look at it.

peter1987
Aug 8 2009, 18:59
Mission briefing doesnt work... I tried everything...
I have seen nearly everything forum topics about this and there is the same:

create an init.sqf and a briefing.sqf in the folder of mission. It doesnt work in my PC under Win Vista...

Code:

init.sqf:

execVM "briefing.sqf";

very easy, no syntax error, briefing.sqf is good too because it is at Map when playing.

The briefing.sqf doesnt want to be executed before starting.... A ghost in my ******* PC or game...

Ghost
Aug 8 2009, 19:20
If you post your mission from legitimate site ill take a look at it if you like.

**UPDATE**

make sure you create a file called briefing.html <--- just like the old way and inside put

<html>
<body>

<!---------------------------------------------------->
<!-- Debriefing -->
<!---------------------------------------------------->
<!-- End #1 -->
<h2><a name="debriefing:end1"></a><br>
<!-- [TITLE_1] -->
Mission Success
<!-- [END] -->
</h2><br><p>
<!-- [TEXT_1] -->
TEXT FOR END !
<!-- [END] -->
</p><br><hr>

<!-- End #2 -->
<h2><a name="debriefing:end2"></a><br>
<!-- [TITLE_1] -->
MISSION FAIL
<!-- [END] -->
</h2><br><p>
<!-- [TEXT_1] -->
TEXT FOR END 2
<!-- [END] -->
</p><br><hr>


</body>
</html>


You can add more endings but that is all this file is used for now. Though it is needed to show map/briefing when holding shift and previewing a mission in editor and such.

Cellus
Aug 8 2009, 23:54
Briefing.html can be an empty file for just seeing the briefing. And if init.sqf wasn't working, you wouldn't see it in game at all!

I'm getting all sorts of hassles since 1.03. Tempted to give up on it altogether...

peter1987
Aug 9 2009, 08:27
My problem has been solved by the briefing.html

Now I see briefing before the mission starts. Thank you all.

white angel
Aug 10 2009, 00:09
Someone know how to do a multi-languages briefing in ArmA2 ?

I don't know how to do with all the file of the briefing :confused:

In ArmA1 we put the name of the language in the name of the file. For example :
briefing.French.html for french
briefing.Spanish.html for spanish
briefing.German.html...
... etc

How can we do that with ArmA2 ?!?

RazorHead1
Aug 14 2009, 00:39
player createDiaryRecord ["Diary", ["Find the Radio", "Your Mission is to find the Good Times Radio"]];

tskObj1 = player createSimpleTask ["Find Radio"];
tskObj1 setSimpleTaskDescription ["You Gotta find that radio!!", "Find the Radio", "This is the radio"];
tskObj1 setSimpleTaskDestination (getMarkerPos "mkrObj1");
player setCurrentTask tskObj1;

tskObj2 = player createSimpleTask ["Find Map"];
tskObj2 setSimpleTaskDescription ["You must retrive the map!!", "Find the map", "It should be here somewhere."];
tskObj2 setSimpleTaskDestination (getMarkerPos "mkrObj2");

Ok This is just a simple briefing that I set up to test as I am still learning. For the most part everything works but what I can't get to happen is when 'tskObj1' is done how to switch to 'tskObj2'.
I am sure I am missing something here. But I can't get it to work. Is there a trigger in the editor that I have to use or does it all happen in the brief.sqf???
Any help would be great. I tried looking for the answer but I am not sure what exactly what I am looking for.

Ghost
Aug 14 2009, 01:21
in your trigger for completion of task 1 have
player setCurrentTask tskObj2;

RazorHead1
Aug 14 2009, 01:38
Thanks Ghost....worked fine. The learning curve with this briefing stuff is very rough. I guess it is just trial and error.

Xtriaden
Aug 17 2009, 19:54
Hi I still cant get this working right /sigh
I have set up a test mission and used sqf and done all the things i was told but still no luck.
I am sure its something that I must be doing wrong but dont have a clue what.
If anyone has the time to look at this very small and simple test mission and tell me what the hell is wrong with it and how to get the test mission to work I would be greatful.
http://rapidshare.com/files/268483766/Task_and_Briefings.Chernarus.zip
Its 1-4 Coop with group respawn, but I dont get the tasks when you die and respawn.

Mike84
Aug 17 2009, 21:10
You're still using 0.01 of my template. Go to the first post and get 0.02 which reruns the briefing.sqf when you respawn.

Btw, which version of arma are you using?

Shuko
Aug 17 2009, 21:45
You're still using 0.01 of my template. Go to the first post and get 0.02 which reruns the briefing.sqf when you respawn.

Btw, which version of arma are you using?

Why'd you rerun briefing again, tasks stay after respawn anyway.

Mike84
Aug 17 2009, 21:47
Well, apparently not for him :rolleyes:

kylania
Aug 17 2009, 21:56
Briefings stay after respawn, you don't have to rerun them, that will only double them up. His problem is that he's not actually respawning, he's using TeamSwitch (respawn 4; though he's missing the closing ; in the description.ext) into AI which never got the briefing in the first place.

If your version 0.2 reruns briefing.sqf each respawn, you're just gonna double up tasks/notes for everyone else to fix the rare problem of those few that use TeamSwitch. :)

Mike84
Aug 17 2009, 22:00
ahh yeh, good spot that missing semicolon.

and yeh, i'll release a 0.03 asap without the EH ;)

Xtriaden
Aug 17 2009, 22:36
Hi Mike84 thanks for your time mate and sorry to be a pain. I downloaded your mission with the 0.02 Briefing.sqf but it did not have a description.ext so there was no way to test if the briefing stays after you respawn. I added my description.ext to the folder and ended up with 2 lots of briefings after respawn. This is because you re-add the briefing after death, which worked great for me before the 1.03 patch. I tried to remove just the execVM "briefing.sqf"; part of your EventHandler but then I end up with no briefing at all after respawn.
So I am still stuck, when I used the revive script I kept my briefings after respawn, but I want Side or Group respawn.
Maybe I just going to have to make all my missions use revive or have no respawning at all.

---------- Post added at 11:36 PM ---------- Previous post was at 11:21 PM ----------

[QUOTE=kylania;1409666] His problem is that he's not actually respawning, he's using TeamSwitch (respawn 4; though he's missing the closing ; in the description.ext) into AI which never got the briefing in the first place.

Yes this sounds right, I added the missing ; but that still did not fix it.
So can I give the AI the Briefing so when I use switch team or respawn Via "Group" or "Side" I get my briefing? :confused:

Mike84
Aug 17 2009, 23:29
I have no experience at all with team switch, but I found this command, onTeamSwitch (http://community.bistudio.com/wiki/onTeamSwitch), which apparently triggers every time you team switch I suppose.

You could put the call to the briefing.sqf in there to fix your problem, but this is just an uneducated guess.

Xtriaden
Aug 18 2009, 10:25
I have no experience at all with team switch, but I found this command, onTeamSwitch (http://community.bistudio.com/wiki/onTeamSwitch), which apparently triggers every time you team switch I suppose.

You could put the call to the briefing.sqf in there to fix your problem, but this is just an uneducated guess.

Thanks Mike84 I will have a mess around with onTeamSwitch and see if I can get the effect I am after from that.

Am I the only person that uses respawn 4 and 5 (group/team)?
Me and my friends like Team/Group respawn but if the community dose not use it maybe I should stop using it for my mission.

Xtriaden
Aug 18 2009, 14:36
Getting closer :-)
I added the Briefing to all playable units in my test mission and when you use team switch or respawn Via Group/Team the Briefings and notes are there.

Only problem now is that just like before the 1.03 patch the tasks status is lost.
I tried placing a Task update Script in the EventHandler part of Mike84 Briefing.sqf but it was not working.

To check that it was not my script or something I had messed up I setup a radio trigger to complette a task and even that did not work. After you die you cant change the task status.
So it looks like it`s impossible to get the tasks updated after you have respawned into an AI.
Maybe there is a way of changing the AI task status when you complete a task but I do not think that will even help as you cant update the task anymore.

Am I the only person that cares about group respawn?
Dose anyone have a woking way around this problem?
Is this something for BIS to fix and I need give it up?

Mike84
Aug 21 2009, 10:28
0.03 (http://www.ofpec.com/forum/index.php?topic=33468.msg230790)

Removed the respawn detector which reran the briefing.sqf, because BIS fixed that in arma 1.03.


@<hidden> Xtriaden
I always use group respawn, but I just have never seen a mission where I had to use teamswitch.

Xtriaden
Aug 21 2009, 20:04
Group and Team respawn still do not keep your Briefing info. The Bug Tracker for this problem is closed and it would be nice to get more confirmation that this is a problem for everyone and not just me whining:-)

Using the "Killed" EventHandler trick Mike84 setup before results multi-briefing problems.
Giving the AI the briefing at the start so that when you respawn into them dose not help as the Tasks can not be updated.

Please can others confirm they get the same problem ?

Do I need to open a New Bug report as the old one is closed ?

wamingo
Aug 25 2009, 16:48
Group and Team respawn still do not keep your Briefing info. (SNIP)

I have this issue so I've been meddling with this for a while now and found that the state of the task variables are stored on death/teamswitch and only the briefing texts are not shown... Thus the following code will create the briefings AND states on both death and teamswitch but with some issues...

known issues:
- TeamSwitching between the same soldiers will duplicate the tasks. This is pretty hideous. Doesn't happen when group respawn.
- The CurrentTask setting is a bit dodgy, it doesn't retain the waypoint unless you manually Set as Current Task again. It's as if you can't store a CurrentTask in a variable, at least not properly. Possibly a bug? Kind of useless if you can't store it isn't it? It won't even return nil or null when no tasks are set.

disclaimer: I'm no guru so this is probably completely crap...
Also, there are lots of Task commands that there is either little or no information about, might be worth looking into.



// wait for players?
waitUntil { !isNull player };
waitUntil { player == player };

switch (side player) do
{
// BLUFOR briefing:
case WEST:
{
player createDiaryRecord["Diary", ["title", "text"]];
//>---------------------------------------------------------<

_CurrentTask_old = CurrentTask player;
_tskObj1_old = nil;
_tskObj2_old = nil;

// Primary Objective
if (!isNil "tskObj1") then {_tskObj1_old = taskstate tskObj1;};
tskObj1 = player createSimpleTask["title"];
tskObj1 setSimpleTaskDescription["text", "title", "title"];
tskObj1 setSimpleTaskDestination (getMarkerPos "mrk_obj1");
if (!isNil "_tskObj1_old") then {tskObj1 setTaskState _tskObj1_old;};

// Secondary Objective
if (!isNil "tskObj2") then {_tskObj2_old = taskstate tskObj2;};
tskObj2 = player createSimpleTask["title"];
tskObj2 setSimpleTaskDescription["text", "title", "title"];
tskObj2 setSimpleTaskDestination (getMarkerPos "mrk_obj2");
if (!isNil "_tskObj2_old") then {tskObj2 setTaskState _tskObj2_old;};

player setcurrenttask _CurrentTask_old;

}

};


if ( isNil {player getVariable "mk_briefingEH"} ) then
{
player addEventHandler ["killed",
{
[] spawn {
waitUntil { alive player };
execVM "briefing.sqf";
};
}];
player setVariable ["mk_briefingEH", true];
};


for teamswitch put in init.sqf:

onTeamSwitch {execVM "briefing.sqf";};

Please post any improvements, thanks.

Xtriaden
Aug 26 2009, 16:21
@<hidden>, Thanks for your reply I was starting to think it was just me with this problem.
I will have a look at your script and see if that helps thanks.

If no briefing after Group or Team Respawn is a problem for everyone maybe BIS might be able to fix it as they did fix it for Base Respawn.

---------- Post added at 05:21 PM ---------- Previous post was at 03:53 PM ----------

@<hidden>, I have had time to play around with your Script alittle now and I still end up with 2 copys of the Briefing after death or no briefing if I remove the EventHandler (patch 1.03+). thanks for trying tho.

wamingo
Aug 26 2009, 22:13
It also duplicates when using GROUP respawn? Group works ok for me - except the setcurrenttask is a bit buggy.

By "Team" do you mean SIDE? Side respawn is like teamswitch and it duplicates, not sure what to do about it.

Really this only works with group... that is... I think it works...

Xtriaden
Aug 27 2009, 16:05
@<hidden>, Hi By "Team" I did mean "Side" respawn sorry.
But I tested your script on Arma2 Patch 1.03 using Group respawn and I am still getting 2 copys of the briefing after I die and respawn. If I remove the EventHandler I do not get any briefing. I keep checking this tread to see if others have the same problem but no-one seams to. I am fed-up with trying to get this to work now and have given up on mission editing. I am wating for a patch to fix it (will not happen if there is only me with a problem) or for OFP2 DR to see if I have more luck with that.
I did have everything working untill patch 1.03 but now I can`t get it to work right, guess it just me doing something wrong.

Xtriaden
Aug 31 2009, 13:04
Still just me then with no briefings after death when using Group / Side respawn problem?

Shuko
Aug 31 2009, 13:12
Playing MP with AIs is silly anyway. ;)

Xtriaden
Aug 31 2009, 13:22
Playing MP with AIs is silly anyway. ;)
But that still dose not confirm anything.

Leving
Aug 31 2009, 14:09
I'm sure that this question has already been answered in the this, as I have read bits on information on it.

I created a trigger which cancels a task after an event.

Can I create a trigger which adds a new task after the same event? I saw someone wrote you use the 'create' command instead of succeeded/failed but I cant seem to get it to work.

Any ideas?

Thanks,
Leving.

Shuko
Aug 31 2009, 14:27
I saw someone wrote you use the 'create' command instead of succeeded/failed but I cant seem to get it to work.


It's basically on every page of this thread alone.



tskObj1 = player createSimpleTask["title"];
tskObj1 setSimpleTaskDescription["text", "title", "title"];


To show a hint



nul=[objNull, ObjNull, tskObj1, "CREATED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";

Leving
Aug 31 2009, 14:57
I think maybe you misunderstood my request.

This code

tskObj1 = player createSimpleTask["title"];
tskObj1 setSimpleTaskDescription["text", "title", "title"];

I'm already using this code in the briefing for tasks which appear at the start of the mission. I don't want the task to appear at the start.

and this

nul=[objNull, ObjNull, tskObj1, "CREATED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";

Looks like a code to create a nicer looking hint, and is linked to a script I assume you have to put in your mission folder.

What I want to do is create a new task midway through the mission, not at the start. The task will become active after a set event (condition).

As I said Im sure this was already answered somewhere in this thread, but I could make no sense of it. I'm not as good as most at mission editing.

Thanks,
Leving.

Shuko
Aug 31 2009, 15:21
I'm already using this code in the briefing for tasks which appear at the start of the mission. I don't want the task to appear at the start.


Nobody is forcing you to just use it at the start. You can use it in trigger etc. So, instead of creating the task at the start and looking for ways to hide and show it, just create it when it is supposed to be shown.

Leving
Aug 31 2009, 15:31
Ah right, so


tskObj1 = player createSimpleTask["title"];
tskObj1 setSimpleTaskDescription["text", "title", "title"];

is going in the On Act box of a trigger.

I thought perhaps Id have had to mess around with it in the breifing file.

Thanks very much, this solved my problem.

Thanks,
Leving.

Leving
Sep 1 2009, 13:15
I'm having a strange problem with the task hint boxes - for some reason, the objectives are repeating themselves over and over.

Any ideas?

Furthermore, once Ive created a task via a trigger in game - how can I get the NEW TASK ASSIGNED box to show like it does at the start?

Nemorz
Sep 4 2009, 00:02
I know this topic is pretty old, but rather than open a new post I'll post here.

How would I go about executing a spawn script when a Task has been selected (and only by uniquely named units)

I have all my markers/waypoints/tasks working, and I have 8 Players and 2 Officers. I want everyone to be able to set a task as their current, which works just fine. When either of the Officers select it, I would like to execute my spawn script.

I know how to execute them via trigger, but as this is a flight map, it would be all too easy to trigger several towns at once, when I only want whatever the Officer selects via Tasks to spawn.

Help would be greatly appreciated :)

kylania
Sep 4 2009, 01:08
It's probably best to simply give the Officers an addAction to initiate a spawn, but if you wanted to use the briefing you can use a trigger with the following condition to check when they accept the task:


taskState tskObj1 == "ASSIGNED";

Just make sure you only assign that task to the officer, with something like this:


waitUntil { !isNull player }; // all hip now ;-)
if (officerUnitName == player) then {

tskObj1 = player createSimpleTask["Spawn: Whatevercity"];
tskObj1 setSimpleTaskDescription["Spawn units in Whatevercity.", "Init Whatevercity", "Active"];
};

Nemorz
Sep 4 2009, 11:02
Works a treat, thanks.

Sutterkane
Sep 4 2009, 13:50
Hello all, i want to understand the two trigger mission briefing...

for example : I need to find ammo in a ammobox near a place...

this is my first mission object, so i need to create in file that kind of text :

//objective 1

tskobj_1 = player createSimpleTask["Find Weapon"];
tskobj_1 setSimpleTaskDescription ["There are more weapon i a cargo container", "Find Weapon", "ammocrate"];
tskobj_1 setSimpleTaskDestination (getMarkerPos "ammocrate");

-after that i'll see many example thats are command !Alive... this command are useful for all kind of mission object?

example, in my mission i have to :

1obj- find a ammocrate
2obj-find a radiopoint
3obj-escape with friendly elycopter

Wich kind of command in "condition" trigger i must create?

Thanks for now

Sutterk.:eek:

Cool Breeze-ICON
Sep 6 2009, 13:21
@<hidden> Leving,

Basically my mission tasks are set 1 to 6 at the start. Then when task 5 has been completed the player activates a trigger cancelling task 6 and adds another task 7.

This is still work in progress but should still help.

Below is an extract from my brief.sqf:-


TASK6 = player createSimpleTask ["TASK6"];
TASK6 setSimpleTaskDescription ["blaaaaaaaa <marker name='mkrExtraction'>Extract</marker> aaaaaaaaaaaaaaaaaaaaaa.", "6. Extraction", "Extraction"];
TASK6 setSimpleTaskDestination (getMarkerPos "mkrExtraction");

TASK5 = player createSimpleTask ["TASK5"];
TASK5 setSimpleTaskDescription ["Locate and destroy the <marker name='mkrTASK5'>east</marker> anti-aircraft battery.", "5. Destroy the east anti-aircraft battery", "Destroy east anti-aircraft battery"];
TASK5 setSimpleTaskDestination (getMarkerPos "mkrTASK5");

TASK4 = player createSimpleTask ["TASK4"];
TASK4 setSimpleTaskDescription ["Locate and destroy the <marker name='mkrTASK4'>anti-air</marker> radar module.", "4. Destroy anti-air radar module", "Destroy anti-air radar module"];
TASK4 setSimpleTaskDestination (getMarkerPos "mkrTASK4");

TASK3 = player createSimpleTask ["TASK3"];
TASK3 setSimpleTaskDescription ["Recon possible AA site on the <marker name='mkrTASK3'>south</marker> of Utes.", "3. Recon the south anti-aircraft battery site", "Recon the anti-aircraft battery site"];
TASK3 setSimpleTaskDestination (getMarkerPos "mkrTASK3");

TASK2 = player createSimpleTask ["TASK2"];
TASK2 setSimpleTaskDescription ["Locate and destroy the <marker name='mkrTASK2'>west</marker> anti-aircraft battery.", "2. Destroy the west anti-aircraft battery", "Destroy west anti-aircraft battery"];
TASK2 setSimpleTaskDestination (getMarkerPos "mkrTASK2");

TASK1 = player createSimpleTask ["TASK1"];
TASK1 setSimpleTaskDescription ["<marker name='mkrInsertion'>Insert</marker> via zodiac and re-supply at weapons cache as required.", "1. Insertion", "Insertion"];
TASK1 setSimpleTaskDestination (getMarkerPos "mkrInsertion");


I am also using fancy task hints. The following extract is taken from my init.sqf


// ***CUSTOM SCRIPT*** - TASK HINTS, used to activate the task hint notice in game.

mk_fTaskHint = compile (preprocessFileLineNumbers "Cust_scripts\Task_hints\fTaskHint.sqf");

sleep 6; // Used to pause the first task hint until the intro screen has finished.

player setCurrentTask TASK1; // When game starts this shows the player that TASK1 has been set as current task.
[TASK1] call mk_fTaskHint; // Shows the player that he received a new task.


The following extracts are saved in a folder:-

"yourmissionname\Cust_scripts\Task_hints"

Save as "TASK1_completed.sqf"


TASK1 setTaskState "SUCCEEDED"; // Sets the task state.
//"mkrInsertion" setMarkerType "empty"; // Hides the task marker once the task has been completed.
[TASK1] call mk_fTaskHint; // Shows the player on the HUD.
hint "Mission plan updated";

sleep 5; // Wait before giving the player a new task.

player setCurrentTask TASK2; // Sets the current task.
[TASK2] call mk_fTaskHint; // Shows the player on the HUD.


Repeat for tasks 2 > 5.

For task 6, save as "TASK6_cancelled.sqf"


TASK6 setTaskState "CANCELED"; // Sets the task state. ("CREATED", "SUCCEEDED", "CANCELED" or "FAILED")
"mkrInsertion" setMarkerType "empty"; // Hides the task marker once the task has been completed.
[TASK6] call mk_fTaskHint; // Shows the player on the HUD.
hint "Mission plan updated";

sleep 5; // Wait before giving the player a new task.

"mkrBOB" setMarkerType "mil_objective";
this setPos getMarkerPos "mkrBOB";
TASK7 = player createSimpleTask ["TASK7"];
TASK7 setSimpleTaskDescription ["<marker name='mkrBOB'>Insert</marker> blaaaaaaaaaaaaaaaaa.", "7. FIND BOB", "BOB"];
TASK7 setSimpleTaskDestination (getMarkerPos "mkrBOB");
TASK7 setTaskState "CREATED";
player setCurrentTask TASK7; // Sets the current task.
[TASK7] call mk_fTaskHint; // Shows the player on the HUD.

For task 7, save as "TASK7_completed.sqf"


TASK7 setTaskState "SUCCEEDED"; // Task has been completed
//"mkrTASK7" setMarkerType "empty"; //Hides the task marker once task has been completed.
[TASK7] call mk_fTaskHint; // show the user
hint "Mission plan updated";

sleep 5; // wait a while, so the player can read the hint

// end the mission now
endMission "END1";


In your mission now add a trigger for task 1 with the following in the "On Act" field:-

nul = execVM "Cust_scripts\Task_hints\TASK1_completed.sqf"; publicVariable "TASK1";

Repeat for tasks 2 > 5.

Now add a trigger for the cancellation of task 6, with the following in the "On Act" field:-

nul = execVM "Cust_scripts\Task_hints\TASK6_cancelled.sqf"; publicVariable "TASK6";

In your mission now add a marker at the location of task 7:-

NAME = mkrbob
ICON = empty
TEXT = BOB

Hope This helps, thanks

Cool Breeze-ICON

RazorHead1
Sep 17 2009, 14:30
Ok I am having the same issue I'll give this a try. I am basically looking for something to the effect of 'if task1 and 2 are complete then assign task3'
I'll give this a try.

Shuko
Sep 17 2009, 14:46
Ok I am having the same issue I'll give this a try. I am basically looking for something to the effect of 'if task1 and 2 are complete then assign task3'
I'll give this a try.

http://forums.bistudio.com/showpost.php?p=1439113&postcount=10

JTF-2 Psycho
Sep 26 2009, 17:11
I have been battling with the briefing/task list ever since arma 2 came out. I finally thought I had it cracked however in my latest map I though all was dandy until the mission/task list started duplicating I think it amounted to around 5 extra lists. Apols if this issue has already been published, however I am pulling my hair out and hope some of you guys out there may lend a hand. People were joining the mission as our server is public, I wonder if it has something to do with this?

Anyways any advice will be greatly appreciated
:yay:

kylania
Sep 26 2009, 17:39
Psycho, make sure you're using ArmA2 1.04 and scripts designed for 1.04. That duplication of tasks came from the fact that previously ArmA2 didn't keep track of tasks after you respawned, so everyone built in scripts that would re-add them after you died. However now that that bug has been fixed tasks stay, so anyone using older player written code which added the tasks back will need to remove that function to stop the duplicating.

BangTail
Oct 16 2009, 19:06
I'm using respawn mode 4 (spawn as one of the remaining group).

The problem is that when one of us dies and respawns into the AI position, we lose our briefing etc and tasks completed.

Is there any way to reinitialise while using this spawn mode without resetting the objectives etc?

I've seen other posts on the subject but there doesn't seem to be a working resolution using respawn mode 4.

Eth

Shuko
Oct 16 2009, 21:28
Create tasks for each member of the group instead of "player" and update accordingly.

BangTail
Oct 16 2009, 21:32
Create tasks for each member of the group instead of "player" and update accordingly.

OK so substitute "player" for "x" (x being name of unit) for example?

That's it?

Ill give it a try and thanks :)

Eth