Jump to content
Sign in to follow this  
SpyderPB6

What am I missing? Briefing.sqf

Recommended Posts

Hello.

I am working on a test mission to check my ability to include a briefing with several notes and tasks. I have viewed tutorials online, tried a briefing generator and copy and pasted script from sources, none of which is working.

So I wonder what am I missing?

Here are my scripts for the breifing, I have tried both and niether yeild results, no tasks or notes appear at all.

This is in my init.sqf: execVM "briefing.sqf";

The following are my briefing files, the first from a generator.

// A2BM W 110

// DO NOT EDIT THIS FILE

waitUntil {!(isNull player)};

waitUntil {player==player};

switch (side player) do

{

case WEST:

{

player createDiaryRecord ["Diary",["Extraction","You will be made aware of your extraction location apon completion of your first task."]];

player createDiaryRecord ["Diary",["Info 2","Multiple hostiles, several light vehicles spotted by CDF. The shipment of Tunguskas was at the docks of Bereznio. They are thought to be awaiting transport and not expected to be manned."]];

player createDiaryRecord ["Diary",["Info 1","Mission is failed pending any player's death."]];

MAG_tskObj1=player createSimpleTask ["Extraction"];

MAG_tskObj1 setSimpleTaskDescription ["Move to <marker name=extraction'>extraction</marker> point","Extraction","Extraction];

MAG_tskObj0=player createSimpleTask ["Destroy Tunguskas"];

MAG_tskObj0 setSimpleTaskDescription ["Destroy the three Tunguskas that arrived on a recient shipment to Bereznio","Destroy Tunguskas","Destroy Tunguskas"];

player setCurrentTask MAG_tskObj0;

};

case EAST:

{

};

case RESISTANCE:

{

};

case CIVILIAN:

{

};

};

Here is the second one, this from an online tutorial,

player createDiaryRecord ["Diary", ["Info 1", "Mission is failed pending any player's death."]];

player createDiaryRecord ["Diary", ["Info 2", "Multiple hostiles, several light vehicles spotted by CDF. The shipment of Tunguskas was at the docks of Bereznio. They are thought to be awaiting transport and not expected to be manned."]];

player createDiaryRecord ["Diary", ["Extraction", "You will be made aware of your extraction location apon completion of your first task."]];

tskobj_2 = player createSimpleTask["Move to Extraction"];

tskobj_2 setSimpleTaskDescription ["Move to extraction provided by CDF", "Move to Extraction", "Extraction"];

tskobj_2 setSimpleTaskDestination (getMarkerPos "extract");

tskobj_1 = player createSimpleTask["Destroy Tunguskas"];

tskobj_1 setSimpleTaskDescription ["Destroy the three Tunguskas that arrived on a recient shipment to Bereznio", "Destroy Tunguskas", "Destory AA Vehicles"];

If anyone could offer some advice as to what I may be missing that would be great.

Thanks,

Mike.

Share this post


Link to post
Share on other sites

Maybe try it like this, this is based on a working version I have used for switching betwwen players squads,

waitUntil {!(isNull player)};
waitUntil {player==player};
switch ((side player)) do
{
case WEST:
{
player createDiaryRecord ["Diary",["Extraction","You will be made aware of your extraction location apon completion of your first task."]];
player createDiaryRecord ["Diary",["Info 2","Multiple hostiles, several light vehicles spotted by CDF. The shipment of Tunguskas was at the docks of Bereznio. They are thought to be awaiting transport and not expected to be manned."]];
player createDiaryRecord ["Diary",["Info 1","Mission is failed pending any player's death."]];
MAG_tskObj1=player createSimpleTask ["Extraction"];
MAG_tskObj1 setSimpleTaskDescription ["Move to the extraction point","Extraction","Extraction"];
MAG_tskObj1 setSimpleTaskDestination (getMarkerPos "extraction");
MAG_tskObj0=player createSimpleTask ["Destroy Tunguskas"];
MAG_tskObj0 setSimpleTaskDescription ["Destroy the three Tunguskas that arrived on a recient shipment to Bereznio","Destroy Tunguskas","Destroy Tunguskas"];
};
case EAST:
{
};
case RESISTANCE:
{
};
case CIVILIAN:
{
};
};

Also as far as I know you can't use the old html coding within a .sqf ie:

<marker name='extraction'>extraction</marker>

I am not sure on this but I think you should probably remove the "setCurrentTask" line out of the briefing and add it to your init.sqf. I assume it may cause problems where it is

Edited by =Odin=

Share this post


Link to post
Share on other sites

You CAN use the old style of html to go to markers, display pictures etc. Those examples seem to be fine, maybe you spelt the filename wrong or something when saving or calling the briefing? There could also be a missing ';' in there which would cause it to mess up. Well here is a working version that I have used for a ONE SIDED para training mission:

{
_x createDiaryRecord["Diary", ["Info", "<br/>co 12 [Tour] Training - Para<br/> By Andy <br/>"]];
_x createDiaryRecord["Diary", ["Briefing", "Today you will be doing the Air Corp HALO Training Course, you will fly in a C130 to the drop zone and then do a HALO parachute jump down as close to the marker as possible, it will be marked with green smoke for extra visibility."]];

tskObj1 = _x createsimpletask["Complete Parachute Training"];
tskObj1 setSimpleTaskDescription["Fly to the drop zone in a C130, then HALO parachute all of your squad onto the helipad marked with green smoke to complete the training.", "Complete Parachute Training", "Complete Parachute Training"];
tskObj1 setSimpleTaskDestination (getMarkerPos "mkrLandingZone");	
_x setCurrentTask tskObj1;
} forEach [b]allUnits[/b];

You can change the 'allUnits' to an array of all units on a certain side / squad and it will still work.

Share this post


Link to post
Share on other sites

Hi Andy,

Thanks for the script, but unfortunately I can't get that to work either. I must be overlooking somthing so ridiculous. Say I did use you're script in the briefing.sqf and the proper execVM line in the init.sqf, what else could cause the script to not work? Any ideas?

Thanks,

Mike.

Share this post


Link to post
Share on other sites

I read somewhere that when you make a mission in the editor and then export it to single player missions, all the file belonging to that mission are mixed into a single .pbo file. My question is: where do I put Briefing.html and init.sqf files? I have the idea that my files are not executed at all.

Thanks in advance.

Nicolai

Share this post


Link to post
Share on other sites

Hmm, since you think you're missing something stupid I'll ask this:

Do you actually execute the script from the init.sqf? That is, in your init.sqf include the following line:

execVM "briefing.sqf";

As briefing.sqf does not get executed automatically by the game, only init.sqf does.

Of course the scripts need to be saved in the same directory that your mission.sqm file is saved, and its actual place depends on the operating system. When you export to single or multi it will then take all the files from the directory along with the mission.sqm file and combine it into a PBO and place it in arma2\missions or arma2\mpmissions folder. If you're making a multiplayer mission, though, it's a good idea to test it on the multiplayer editor, as some things work differently in SP and hosted MP (and dedicated server is different than both!).

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
Sign in to follow this  

×