Jump to content
Sign in to follow this  
=SF=Hyrax

Set Task to specific group

Recommended Posts

I used Search to no prevail. but i was wondering how to set a task to a certain group/ Squad within a mission. Example Alpha Squad task to blow Radio tower. Team Delta is to eliminate the general ect ect ect

Share this post


Link to post
Share on other sites

Add group check to briefing.sqf

waitUntil { !isNull player };
switch ((group player)) do {
 case gAlpha: {
   tskTower = player createSimpleTask["myTask"];
   tskTower setSimpleTaskDescription["myTaskDesc","myTaskDescShort","myTaskDescShort"];
 };
 case gDelta: {
   tskGeneral = player createSimpleTask["myTask"];
   tskGeneral setSimpleTaskDescription["myTaskDesc","myTaskDescShort","myTaskDescShort"];
 };
};

Share this post


Link to post
Share on other sites

I'm trying to do pretty much the same thing with no luck. Help please? :o

I'm trying to assign this to the group I have defined as "Alpha"

player createDiaryRecord ["Diary", ["Mission", "UAV footage has indicated that there is possible guerrilla activity in the village of Gorka. Two fire teams will be deployed via MH-60K to the village and will conduct a complete sweep to eliminate any OPFOR and secure caches or other threats."]];
player createDiaryRecord ["Diary", ["Situation", "Over the past few months the insurgency in Chernarus has been all but eliminated. However, recent reports have indicated that guerrilla forces are stockpiling weapons in the mountain regions of Chernarus and may seek to destabilize the area again."]];
tsk1 = player createSimpleTask ["Sweep Gorka for Enemy Forces."];
tsk1 setSimpleTaskDescription ["Advance through Gorka and elimate any threats. Light enemy movement has been observed throughout the village, and a likely ammunition cache is near the logging facility.", "Sweep Gorka for Enemy Forces", ""];
tsk1 setSimpleTaskDestination (getMarkerPos "infantry");
player setCurrentTask tsk1;
tsk2 = player createSimpleTask ["Destory Cache"];
tsk2 setSimpleTaskDescription ["Locate the ammunition cache in Gorka and destroy it using satchel charges.", "Destroy Cache", ""];
tsk2 setSimpleTaskDestination (getMarkerPos "cache");
tsk3 = player createSimpleTask ["Extract"];
tsk3 setSimpleTaskDescription ["Once Gorka is clear, move to the extraction point and board the helo.", "Extract", ""];
tsk3 setSimpleTaskDestination (getMarkerPos "Extract");
tsk4 = player createSimpleTask ["Report to CO"];
tsk4 setSimpleTaskDescription ["Disembark the helo at the firebase and report to your commanding officer to be debriefed.", "Report to CO", ""];
tsk4 setSimpleTaskDestination (getMarkerPos "CO");

Then I'm trying to assign these tasks to the groups defined as "Buzzard 1" and "Buzzard 2"

tsk1cas = player createSimpleTask ["Provide CAS"];
tsk1cas setSimpleTaskDescription ["Give Alpha squad close air support as they sweep the village of Gorka.", "Provide CAS", ""];
player setCurrentTask tsk1cas;
tsk2cas = player createSimpleTask ["RTB"];
tsk2cas setSimpleTaskDescription ["After ammunition is expended or Alpha's tasks are completed, return to base for resupply.", "RTB", ""];

These are my original briefing files, I tried following the post above but my tasks were not showing up. I have used

Alpha=group this; alpha setgroupid ["Alpha"];

to define the names of the groups (for example).

Help would be greatly appreciated!

Share this post


Link to post
Share on other sites
waitUntil { !isNull player };
switch ((group player)) do {
 case Alpha: {
   player createDiaryRecord ["Diary", ["Mission", "UAV footage has indicated that there is possible guerrilla activity in the village of Gorka. Two fire teams will be deployed via MH-60K to the village and will conduct a complete sweep to eliminate any OPFOR and secure caches or other threats."]];
   player createDiaryRecord ["Diary", ["Situation", "Over the past few months the insurgency in Chernarus has been all but eliminated. However, recent reports have indicated that guerrilla forces are stockpiling weapons in the mountain regions of Chernarus and may seek to destabilize the area again."]];
   tsk1 = player createSimpleTask ["Sweep Gorka for Enemy Forces."];
   tsk1 setSimpleTaskDescription ["Advance through Gorka and elimate any threats. Light enemy movement has been observed throughout the village, and a likely ammunition cache is near the logging facility.", "Sweep Gorka for Enemy Forces", ""];
   tsk1 setSimpleTaskDestination (getMarkerPos "infantry");
   player setCurrentTask tsk1;
   tsk2 = player createSimpleTask ["Destory Cache"];
   tsk2 setSimpleTaskDescription ["Locate the ammunition cache in Gorka and destroy it using satchel charges.", "Destroy Cache", ""];
   tsk2 setSimpleTaskDestination (getMarkerPos "cache");
   tsk3 = player createSimpleTask ["Extract"];
   tsk3 setSimpleTaskDescription ["Once Gorka is clear, move to the extraction point and board the helo.", "Extract", ""];
   tsk3 setSimpleTaskDestination (getMarkerPos "Extract");
   tsk4 = player createSimpleTask ["Report to CO"];
   tsk4 setSimpleTaskDescription ["Disembark the helo at the firebase and report to your commanding officer to be debriefed.", "Report to CO", ""];
   tsk4 setSimpleTaskDestination (getMarkerPos "CO");
 };
 case Buzzard1: {
   tsk1cas = player createSimpleTask ["Provide CAS"];
   tsk1cas setSimpleTaskDescription ["Give Alpha squad close air support as they sweep the village of Gorka.", "Provide CAS", ""];
   player setCurrentTask tsk1cas;
   tsk2cas = player createSimpleTask ["RTB"];
   tsk2cas setSimpleTaskDescription ["After ammunition is expended or Alpha's tasks are completed, return to base for resupply.", "RTB", ""];
 };
 case Buzzard2: {
   tsk1cas = player createSimpleTask ["Provide CAS"];
   tsk1cas setSimpleTaskDescription ["Give Alpha squad close air support as they sweep the village of Gorka.", "Provide CAS", ""];
   player setCurrentTask tsk1cas;
   tsk2cas = player createSimpleTask ["RTB"];
   tsk2cas setSimpleTaskDescription ["After ammunition is expended or Alpha's tasks are completed, return to base for resupply.", "RTB", ""];
 };
};

Share this post


Link to post
Share on other sites
Add group check to briefing.sqf

How do you add group check to briefing.sqf??? I am sorry but I am new to this!

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  

×