Jump to content
Sign in to follow this  
bangabob

Multiple tasks for both sides

Recommended Posts

I searching all over the web but couldn't find what i was looking for. I have some editing knowledge and have created missions in the past.

Basically my mission involves 2 SIDES for a MP mission night

WEST and EAST.

The WEST tasks involve getting to one of the 8 triggers Marked on the map. These are defined in the Briefing.sqf

While the EAST will have a task to destroy the WEST soldiers. (The WEST team leader has a marker that updates on his location every 5 minutes. This marker will be the task marker in the briefing.sqf for the EAST.

So my question is how can i get both sides to have separate tasks?

Any help would be appreciated

Share this post


Link to post
Share on other sites

Use Mikey's wonderful template. :)

/*
 *	Mikey's Briefing Template v0.03
 *
 *
 *	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 variable names.
 *
 *
 *		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 an existing marker!
 *		- Set the Current Task:	player setCurrentTask tskExample;
 *		
 *		Formatting:
 *		- 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'/> 
 *		   - custom width/height:	<img image='somePic.jpg' width='200' height='200'/>
 *		
 *		Commands to use in-game:
 *		- Set Task State:		tskExample setTaskState "SUCCEEDED";   // states: "SUCCEEDED"  "FAILED"  "CANCELED" "CREATED"
 *		- Get Task State:		taskState tskExample;
 *		- Get Task Description:         taskDescription tskExample;   // returns the *task title* as a string
 *		- Show Task Hint:		
 *                                             taskhint ["New Task!\nHere's your new task!", [1, 1, 1, 1], "taskNew"];
 *                                             taskhint ["Task Assigned!\nDo this now!", [1, 1, 1, 1], "taskCurrent"];
 *                                             taskhint ["Task Succeeded!\nGood job!", [0.600000,0.839215,0.466666,1], "taskDone"];
 *                                             taskhint ["Task Failed!\nBad job!", [0.972549,0.121568,0,1], "taskFailed"];
 *                                             taskhint ["Task Canceled!\nNever mind!", [0.75,0.75,0.75,1], "taskFailed"];
 *							
 *
 *	Authors: Jinef & mikey
 */

// since we're working with the player object here, make sure it exists
waitUntil { !isNull player }; // all hip now ;-)
waitUntil { player == player };



switch (side player) do 
{

case WEST: // BLUFOR briefing goes here
{
	player createDiaryRecord["Diary", ["Info", "<br/>Demo by kylania<br/><br/>Version 1.0<br/>"]];
	player createDiaryRecord["Diary", ["Enemy forces", "<br/>Enemy forces are comprised of nothing at all."]];
	player createDiaryRecord["Diary", ["Friendly forces", "<br/>You have available to you yourself and the HMMWV you need to park."]];
	player createDiaryRecord["Diary", ["Mission", "<br/>In this mission you are to park that HMMWV where it tells you to."]];
	player createDiaryRecord["Diary", ["Situation", "<br/>We need to be parking up in here!"]];

             // Objectives are added in "reverse" order for them to display correctly in game.


	// Second Objective
             // This is what will be added via a trigger on the map.  
/*           tskGetIn setTaskState "Succeeded"; 
	taskhint ["Task Succeeded!\nGood job getting in the HMMWV!", [0.600000,0.839215,0.466666,1], "taskDone"];
	"mrkPark" setMarkerAlpha 1; 
	tskPark = player createSimpleTask["Park the HMMWV"]; 
	tskPark setSimpleTaskDescription["Park the HMMWV <marker name='mrkPark'>here</marker>.", "Park the HMMWV", "Park!"];
	tskPark setSimpleTaskDestination (getMarkerPos "mrkPark");
	player setCurrentTask tskPark;
             taskhint ["New Task!\nPark that HMMWV!", [1, 1, 1, 1], "taskNew"];
*/		

	// First Objective
	tskGetIn = player createSimpleTask["Get in the HMMWV"]; 
	tskGetIn setSimpleTaskDescription["Get in the HMMWV.  You'll be told where to park once you are behind the wheel.", "Get In HMMWV", "Get In!"];
	tskGetIn setSimpleTaskDestination (getPos car);

	player setCurrentTask tskGetIn;
             taskhint ["New Task!\nGet in that HMMWV!", [1, 1, 1, 1], "taskNew"];
};


case EAST: // REDFOR briefing goes here
{

};


case RESISTANCE: // RESISTANCE/INDEPENDENT briefing goes here
{

};


case CIVILIAN: // CIVILIAN briefing goes here
{

};
};

Share this post


Link to post
Share on other sites

You can use Shuko's Taskmaster to do this and it also fully supports JIP so everybody sees the proper current task states if they join late or reconnect. I converted my mission to it last night and hosted and tested it all, it works great. That's why I'm still up at 5AM and am about to go to bed. I'll speak to you tomorrow maybe if you're on TS.

Share this post


Link to post
Share on other sites

Okay cheers. Very useful scripts there and i will be sure to implement one of them.

I have another question although not related to the topic.

Is it possible to have a BLUFOR group spawn together at the start of the mission at a number of different predetermined positions.

For example. 5 different spawn points for the BLUFOR group at the mission start while the OPFOR spawn in one static position?

Share this post


Link to post
Share on other sites

Group the group leader with 4 markers and place the markers where you want them to possibly spawn. At game start the leader will spawn either where placed or at one of the other markers and the group members, all set to 'In Formation' will spawn with him.

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  

×