Home   Help Search Login Register  

Author Topic: ArmA Objectives and briefing  (Read 1849 times)

0 Members and 1 Guest are viewing this topic.

Offline Rytuklis

  • Members
  • *
ArmA Objectives and briefing
« on: 05 May 2012, 15:57:18 »
Alright... Briefing and objectives in OFP are so simple and easy, but i still don't get it how to make these in ArmA II.

Can someone lend a hend and give me a detailed explanation? Thanks.

Offline Willsdorf

  • Members
  • *
Re: ArmA Objectives and briefing
« Reply #1 on: 06 May 2012, 10:23:53 »
Hello,
You may try taskmaster2 :
http://www.armaholic.com/page.php?id=7377
\"Qui n\'entend qu\'une cloche n\'entend qu\'un son.\"

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: ArmA Objectives and briefing
« Reply #2 on: 07 May 2012, 15:50:08 »
Using a generator (like the one linked above, or this one) is the easiest way, but you might want to know how it actually works too.

Basically, you need to run a file (usually named briefing.sqf) from your init.sqf (or from the init field of a unit), which contains all the text etc. of your briefing. So, example:

init.sqf:

Code: [Select]
[player] execvm "briefing.sqf"
briefing.sqf:

Code: [Select]
_unit = _this select 0;

_unit createDiaryRecord ["Diary", ["Extra stuff", "Add extra info here."]];

_unit createDiaryRecord ["Diary", ["Situation", "Situation Text"]];

_unit createDiaryRecord ["Diary", ["Background", "Background text"]];

Task1 = _unit createSimpleTask [""];
Task1 setSimpleTaskDescription ["Main Text", "Description", "Waypoint Description"];
//RUG_Task1 setSimpleTaskDestination (getpos place1)

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

Task2 = _unit createSimpleTask [""];
Task2 setSimpleTaskDescription ["Main text", "Short Description", "Waypoint Description"];
//RUG_Task2 setSimpleTaskDestination (getpos place2);

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

The commented parts (setSimpleTaskDestination) would attach a waypoint to (for instance) an invisible H or a Game Logic named place1 and place2; these would show up on your HUD when you set that task as current. The big script-lines are the ones that make the nice text show up on the screen, "New Task Assigned" and such. Other options aside from "CREATED" can be read here: linky. That won't actually fail or cancel the tasks though, you still need to use setTaskState for that.

But yeah, the generators might be the best way to go :)

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Rytuklis

  • Members
  • *
Re: ArmA Objectives and briefing
« Reply #3 on: 07 May 2012, 18:35:00 »
Thanks, appreciated