Jump to content

Recommended Posts

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

Edited by Redfield-77

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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:

Share this post


Link to post
Share on other sites

Why they don't have a simple screen to type in a briefing in the editor in the first place is beyond me.

Share this post


Link to post
Share on other sites

Ok, problem is gone.. ;)

Edited by Wiggum

Share this post


Link to post
Share on other sites

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:

Edited by Mr Burns

Share this post


Link to post
Share on other sites

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 ?

Edited by Wiggum

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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/&gt]];

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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?

Edited by Cellus

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

@ Brute,

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

Share this post


Link to post
Share on other sites
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 ^^

Share this post


Link to post
Share on other sites

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'.

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites

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 at ofpec, do check that out as well.

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×