Jump to content
Sign in to follow this  
santafee

Multiplayer Briefing[Mate cant see]

Recommended Posts

Hey,

i created a simple mission with the editor an on the server i can see the briefing and stuff,mate not.Can someone tell me how i can fix that please?Usually the init.sqs should execute the briefing for all like i understand,but it didnt work...;-(

Thx allready..!

Share this post


Link to post
Share on other sites

whack this in your init.sqf:

// wait for JIP playerss to sync

if ( (!isServer) && (player != player) ) then

{

waitUntil {player == player};

waitUntil {time > 10};

};

//once we have a player, execute the briefing script to set up tasks and diary entries

if !(isnull player) then {

null = [] execvm "briefing.sqf";

};

Share this post


Link to post
Share on other sites

Ok,i tried that but looks like it doesnt work.

What i got is sure..a "Player" and a "Playeble" Character,so 2 people can play.

I actually cant check if it works with somebody on the server,but i tried switching between the 2 players and i cant see it..?Only the "player" can see it if i choose the "playeble" Character it wount show up.

btw is there an way to show the actual targets after the respawn,too.Its so annoying,i figured all that stuff with editor out but now im stuck at that last point..

Edited by Himmelsfeuer

Share this post


Link to post
Share on other sites

if you've designed a MP mission - ensure that all units are set to "playable", you don't need the "player" setting - this is only for previewing in the editor or SP missions.

Using the term "player" in a script refers to a player object - which is any unit currently being controlled by a human.

When you switch to the playable unit (ie through teamswitch), I'm not sure what happens. But you should find with the addition that I've suggested to your init.sqf that when you actually HOST the mission - ie run it from the MP menu, rather than from the editor, you should see your mission tasks etc.

Share this post


Link to post
Share on other sites

thx allready for the tipps,but its really strange..how i tested it:

set 2 !playble! units on the map,started a LAN game in multiplayer.then u choose ur player,if u did that, u can see the briefing,then u can start the game after.I dont started it,i went back andi chose the other player,worked fine also,briefing shows.When i go ingame with 1 now,i still can see it.Then i exit(game saves)use the other player and the ingame briefings is gone..?!

Eh its bad if u have to test that all, but ur m8 is not there...Guess il have to wait till hes online..

Share this post


Link to post
Share on other sites

ah....in MP you have problems associated with JIP (join in progress) players and also respawning players.

If you download the "Hunt Waldo" MP mission, you'll find a script in there called "tasksfix.sqf" which basically runs another version of the briefing.sqf script. It's triggered as part of an event handler for respawning players, but also every time a JIP player joins, ensuring that not only are the tasks added, but updated to the correct state.

Share this post


Link to post
Share on other sites

@TurokGMT:

Are you sure? I've looked into the mission (version 1.2) but there is no tasksfix.sqf. I used baregrep to search inside the source code but there is no hint of it. Maybe it's another version or another mission? Could you please look again or upload the mission in this thread?

Share this post


Link to post
Share on other sites

It's in the version of the mission I have. Depbo it and you'll find a folder inside called scripts. The file is called tasks_fix.sqf.

Here are it's contents:

[] execVM "Briefing_start.sqf";

["Start"] execVM "Briefing_live.sqf";

if(Cleared_Strelka) then{["Strelka"] execVM "Briefing_live.sqf"};

if(Cleared_Airfield) then{["Airfield"] execVM "Briefing_live.sqf"};

if(Cleared_Kameny) then{["Kameny"] execVM "Briefing_live.sqf"};

if(true) exitWith{};

Share this post


Link to post
Share on other sites

I got mine (v1.9) from the hunt waldo thread in the user missions forum here - just look around, the current version is in the guy's sig I think.

Share this post


Link to post
Share on other sites

This is the breifing template i use, it works for JIP players and when you respawn etc..

init.sqf

execVM "briefing.sqf";

briefing.sqf

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

Share this post


Link to post
Share on other sites

Using the term "player" in a script refers to a player object - which is any unit currently being controlled by a human.

Doesnt player just refer to the player object on that machine. Ie, on a coop mission, if there are 3 human players, then on each of their machines, player will refer to themselves. So player on my pc is me, player on yours is you, player on dedi server is null.

Cheers

GC

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  

×