Jump to content

Recommended Posts

Hello all...

Multiplayer JIP issue here...

Spent a long time searching various threads and I still cannot find an answer anywhere.

I have the following as the very first line of my init.sqf

execVM "briefing.sqf";

Now.... When the mission starts on a dedi server... the briefing shows no problem and everyone has the tasks, etc etc.

Yet if anyone JiP's they dont get the briefing??????? HOW do we force JiP's to get the briefing?

The wierd thing is, the gear saving script works for JiP's, despite it coming directly after the briefing exec, in the init document?

Can someone provide the code required in the init to ensure that JiP's can get the briefing please.... many thanks.

BD1

Share this post


Link to post
Share on other sites

You're probably adding the briefing to player, while for JIP players player is null when the mission starts so notes aren't added. Either add the notes to the actual unit (in missions with no respawns), or wait until player is not null (by adding a waitUntil {!isNull player}; to the start of the briefing script) on missions with respawns.

Share this post


Link to post
Share on other sites

Thanks galzohar...its a respawn mission, so I will add this to the briefing script...

Share this post


Link to post
Share on other sites

So i got a little problem, i have a task that set with a TRIGGER to create it in the diary, which works perfectly with

tskobj_3 = player createSimpleTask["Blow up the car"]; 
tskobj_3 setSimpleTaskDescription["Damn car ran out of gas, take out your anger", "blow up da car", "blow up da car"]; 
tskobj_3 setSimpleTaskDestination (getMarkerPos "obj_3"); hint "Your Tasks have been updated"; 

which is all fine and dandy since i have the HINT placed in, but the main issue i have is that with my other tasks i have that nifty little code

tskobj_1 = player createSimpleTask["Blow up da Truck"];
tskobj_1 setSimpleTaskDescription ["The truck has pissed you off for the last time so blow it up", "Destroy the truck", "Blow up da truck"];
tskobj_1 setSimpleTaskDestination (getMarkerPos "obj_1");
[objNull, ObjNull, tskobj_1, "ASSIGNED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";

in place to give the prompt right on the screen which works a bit better for my friends to pay attention to. but if i try and put

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

in the Trigger i get "Type script, expected nothing" so at this point i really don't know much about this stuff just enough to get by and i cannot seem to get that niffty little pop up to show up.

2nd questions I have a tasks that gets assinged by a trigger and since the task is being assigned by the trigger and not written in the briefing.sqf does that mean that the end trigger of obj_1 && obj_2. will not work cause only obj_1 is created in the breifing?

3rd question, I found and modified the evidence collection code that was posted in the fourms, to create another task after you get the evidence which works fine

deletevehicle case;
tskobj_2 setTaskState "SUCCEEDED";
tskobj_4 = player createSimpleTask["blow up the tractor"];
tskobj_4 setSimpleTaskDescription ["The deep hatred of tractors, comes to life", "blow up the tractor", "blow up tractor"];
tskobj_4 setSimpleTaskDestination (getMarkerPos "obj_4");
[objNull, ObjNull, tskobj_4, "ASSIGNED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";

But heres the part that gets me, Is that i want more then one marker to show, ultimatly i want that task to be like a destroy the convoy type mission, so i would like to have a "Start" and "Finish" marker placed on the map ONLY when the task is assigned after collecting evidence from task 2. and yes i have tried

tskobj_4 setSimpleTaskDestination (getMarkerPos "start","finish");

I hope my questions are clear lol. Any response would be helpful, and i could send ya my task testing mission, to see what i've done.

Thanks in advance for the help guys

Share this post


Link to post
Share on other sites

Any code written in the editor (that is, in trigger onAct lines, unit init lines, etc) must not return anything for some odd reason. Use hNil = [objNull, ObjNull, tskobj_3, "ASSIGNED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf"; instead.

Share this post


Link to post
Share on other sites

Hello all

I'm becoming really crazy and desperate to let my briefing works from this morning. I read hundreds of posts, threads... did searches on google, tried a lot of things.. but nothing worked.... my briefing is not showing!!!!

Ok

This is the init.sqf

execVM "briefing.sqf";

:D

This is the briefing.sqf

waitUntil {!(isNull player)};
waitUntil {player==player};
switch (side player) do
{
case WEST:
{
player createDiaryRecord ["Diary", ["Friendly Forces", "Thanks to UN support we were able to move two infantry squads, setting up a fast camp on Moltia Intl Airport. We had not time to move big assets, so we can count only on some HMMWVVs and two LAV. Also available two BlackHawk and two Apache Longbow, anyway we cannot use them until any AA threats is cleared"]]; 

tskobj_1=player createSimpleTask ["Destroy AA Radar"];

tskobj_1 setSimpleTaskDescription ["The island is patroled from numerous tunguskas. We dont have the assets to destroy all of them, and so we cannot use helicopters for transport or attacking objectives. we can solve the situation destroying the AA radar. This is the first task you will have to complete to reach your objectives", "Destroy AA Radar", "Destroy AA Radar"];

player setCurrentTask tskobj_1;
};
case EAST:
{
};
case RESISTANCE:
{
};
case CIVILIAN:
{
};
};


// run this file again when respawning (only setup the killed EH once though)
if ( isNil {player getVariable "mk_briefingEH"} ) then 
{
player addEventHandler ["killed", 
{ 
	[] spawn {
		waitUntil { alive player }; // waitUntil player has respawned
		execVM "briefing.sqf"; 		// make sure this path is correct
	};	
}];
player setVariable ["mk_briefingEH", true];

I've tried to show it inside the editor (pressing Shift), hosting the game on my PC and also on dedi server.

It NEVER shows up

Please, help me... :(

Share this post


Link to post
Share on other sites

Does the briefing work? I mean if you open the map, do you have your tasks etc. listed?

I think you need to put a sleep a statement in the init.sqf after the briefing is created and the game somehow magically knows that it should go to the briefing before going in game. Or did I dream that?

Try adding a "sleep .1;" after your execVM in your init.sqf and see if that helps.

Edited by some kind of guy
Correct magical fix provided by Jezuro

Share this post


Link to post
Share on other sites

The code seems fine (except the missing closing bracket right at the end, shouldn't cause any trouble here though).

In order to make the briefing screen pop up (even with Shift key when previewing the mission), you have to have briefing.html file in the mission folder. It can be empty, but it has to be there.

Edited by Jezuro

Share this post


Link to post
Share on other sites

Tried both things (sleep and briefing.html)...

Not working :(

p.s.

I dont see NOTHING

No tasks, no briefing, no objectives...

Share this post


Link to post
Share on other sites

If you place any sleep in the briefing.sqf you will not see any briefing until the mission actually starts.

Share this post


Link to post
Share on other sites

Umm... Player's side IS west, right?

Share this post


Link to post
Share on other sites
Umm... Player's side IS west, right?

Yes, of course.. I also tried to delete the "side" division and create a one valid for all, but with same results...

---------- Post added at 12:32 PM ---------- Previous post was at 12:31 PM ----------

If you place any sleep in the briefing.sqf you will not see any briefing until the mission actually starts.

I also "started" the game, walked around in the map for at least 2-3 mins, but no briefing/tasks list showed up.

Share this post


Link to post
Share on other sites

Just made a test mission using that briefing script (with the added } at the end) and it works fine. Are you sure the files have been created with the correct names? Windows Explorer will hide the file extension by default, so if you create a new text document and it's shown as "New Text Document", its real name is actually "New Text Document.txt". If you rename it to "briefing.sqf", then its actual name will be "briefing.sql.txt". Same goes for the init.sqf.

Under Explorer, Tools -> Folder Options, View tab, and deselect "Hide extensions for known file types".

Share this post


Link to post
Share on other sites

I cannot believe to my eyes

The problem is sorted out.....

I saved the "init.sqf" as "int.sqf"

I really dont know what was in my eyes that cause me not see this in about 4 days... :eek:

Sorry for your time, excuse me :o

Share this post


Link to post
Share on other sites

I got a problem with the briefing multiplayers mission, only the leader can see the briefing and not other players why ?

In the folder I have :

- R3F_revive folder

- briefing.sqf

- description.ext

- init.sqf

- mission.sqm

- stringtable.csv

Did I forget something ?

Thanks for your answers :)

Share this post


Link to post
Share on other sites

Who are you creating the briefing notes for? Are you creating them properly for JIP players? Briefing notes are created on a per-unit basis (so if you swap to a unit that has no briefing added to it, it will have no briefing), as well as on a per-machine basis (so if my computer creates a briefing note your computer will not see it, regardless of which unit I created the briefing note for).

Share this post


Link to post
Share on other sites

Is there any way to fit an image to any menu size?

I have an image in my briefing with a size of 512x256. With menu size set to very small it looks just fine. But changing the menu size to anything else results in the image being too large to fit in the textfield and it is cut off.

Already tried using custom width and height in addition with the safeZone commandes, but they don't seem to work for this (probably because the code for adding images is something html'ish?).

Any suggestions?

Share this post


Link to post
Share on other sites
"Succeeded", "Failed", "Created", "Canceled".
@Jezuro

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? ;)

So, yeah, now I'm officially confused (happens easily) :) I was trying to use "ASSIGNED" via script (setTaskState), but doesn't seem to work. Then again, so does nothing else I try lately it seems :p

What I'm trying to do is show the tasks, as you know it's part of the mission, but you shouldn't be able to actually select it until a certain criteria is met. The player is the #2 guy in his squad, so he is not in charge to make that decision, and even when he is, the order will come from higher up in the chain.

Is this even possible, or do I have to rely on diary for this? Or maybe not add the description until due time?

Second question: In my mission I activate taskLIPrimary by clicking on it. I blow up the objective causing EH-Killed to update using tskLIPrimary setTaskState "Succeeded"; followed by {_x setCurrentTask tskLISecondary} forEach allUnits;. When I check in mission with hint str (taskState tskLIPrimary), I get "Succeeded" (which is what I want). hint str (taskState tskLISecondary) returns "assigned" (also what I want).

But, in the actual tasklist, what happens is that tskLIPrimary is "unselected" and I can again select it, while tskLISecondary get no change at all. I've tried both presetting tskLISecondary to "canceled" (can't select it), and do nothing at all to it (can select it).

Scripts:

Task script:

{
//Deleted stuff	
if (_x in d_playablesLion || debug) then {
	tskLISecondary = _x createSimpleTask ["Lion: Block road"];
	tskLISecondary setSimpleTaskDescription ["Block the northern road approach for reinforcements from Kamenyy to the airport area.", "Lion: Block Road", "Stop Reinforcements"];
//		tskLISecondary setSimpleTaskDestination (getMarkerPos "mObjLI_Secondary");

	tskLIPrimary = _x createSimpleTask ["Lion: Comm Center"];
	tskLIPrimary setSimpleTaskDescription ["Destroy the Comm Center to prevent enemy mortar support.", "Lion: Comm Center", "Destroy Comm Center"];
	tskLIPrimary setSimpleTaskDestination (getMarkerPos "mObjLI_Primary");

	_x setCurrentTask tskLIPrimary;
//		tskLISecondary setTaskState "Canceled";
};
} forEach (if (debug) then {allUnits} else {d_playablesAll});

EH-Killed (that does kick in):

case "BTR90_HQ_unfolded" : {
	"EH-Killed - BTR90_HQ_unfolded was killed" call debugChat;
	if (_killed == uObjCommCenter) then {
		sleep 4 + (random 4);
		tskLIPrimary setTaskState "Succeeded";
//			tskLISecondary setTaskState "Assigned";
		{_x setCurrentTask tskLISecondary} forEach allUnits; //Yikes!!! Need to fix this
		tskLISecondary setSimpleTaskDestination (getMarkerPos "mObjLI_Secondary");
	};
};

Disregard the Yikes thing, I first need to get this working in debug mode :)

Any ideas where I might be going wrong?

Again, hinting produces the desired output, but it is not reflected on the map screen under tasks or when showing the journal. What on earth can be the cause of this?

In order to make the briefing screen pop up (even with Shift key when previewing the mission), you have to have briefing.html file in the mission folder. It can be empty, but it has to be there.

I guess that answered my next question, so, thanks :)

Edited by CarlGustaffa

Share this post


Link to post
Share on other sites

Assigning a task with the same handle to multiple units is not advised; the handle will be valid only for the task assigned to the last unit from the list.

Share this post


Link to post
Share on other sites

What I'm trying to do is show the tasks, as you know it's part of the mission, but you shouldn't be able to actually select it until a certain criteria is met. The player is the #2 guy in his squad, so he is not in charge to make that decision, and even when he is, the order will come from higher up in the chain.

Simple way is just to add tasks when they are relevant, instead of creating all of them right at the start. Depending on mission, you can give the general picture/flow of tasks in notes.

Share this post


Link to post
Share on other sites

For anyone who wishes to add a new type of entry to their briefing try....

index = player createDiarySubject ["Intel","Intel"];

this will create a new entry...then use

player createDiaryRecord ["Intel", ["heading", "some useful info you dont want under Diary"]];

all in your briefing.sqf

Share this post


Link to post
Share on other sites
Assigning a task with the same handle to multiple units is not advised; the handle will be valid only for the task assigned to the last unit from the list.

Ok, that might explain why it all suddenly worked when I tried as a newly created civilian observer - he was the last in the list, thus is worked. I assume I just have to make use of onTeamSwitch then.

@shk: Noted.

Share this post


Link to post
Share on other sites

Or just create (and update) all tasks for all relevant units. It's not very complex.

Share this post


Link to post
Share on other sites

I have two tasks per team, where I select one off three teams in a startup dialog. Each team has three playable characters via teamswitch, which is enabled dynamically (only when I choose to leave my squad to command my "fireteam"). In addition, all teams have three common tasks. So, for me it's becoming a little more complex than I originally thought.

Btw, everything worked fine when I didn't debug and wanted to show everthing going on to my "debug character". Well, everything regarding tasks anyway... :p

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

×