Jump to content
Steiner34

Tutorial: How to use the Task Modules

Recommended Posts

So after some people reported having some problems with the new Task modules I'm going to explain it here how to use them in a simple and proper way.

In this case i will make a short mission where you have to kill an enemy unit.

So lets start:

1.Create a player unit

2.Create an enemy unit

3.Create a trigger around the enemy unit, group it with the trigger and set the condition to "not present"

So far so good. Now comes the module part:

4. Create the module "Create Task"(At the point "Apply to" set it to "Group of synchronized objects". The rest is up to you)

5. Synchronize this module to the player

6. Create the module "Create diary record", fill it out with your preferences and synchronize it to your unit as well.

7. Now create the module "Set Task Destination" set it to "Synchronized Object" and synchronized it with "Create Task" and the Enemy unit

8.Now the last part. Create the module "Set task state" set it to succeeded and synchronize it with "Create Task", "Set Task Destination" and the trigger you've placed.

Done. If everything works fine you will get your task at start and if you kill the unit the Task will be set as "Succeeded".

Hope this helps. :D

Edited by Steiner34
  • Like 2

Share this post


Link to post
Share on other sites

It works flawlessly in SP but won't show up for clients on multiplayer. Is there anyway to fix that?

Share this post


Link to post
Share on other sites

This was helpful, although I am having the same issue as Ironham. Also, I cannot get objectives to tick off as complete when they are completed.

I think the first issue can be mitigated somewhat by linking the task to a trigger area, but I have yet to test. But doing that will lose out on having the tasks on the briefing screen prior to mission load.

Share this post


Link to post
Share on other sites

Have you guys changed the 'Apply to' section in the Create task module to 'Groups of synchronized objects'? That is, presuming that all players you want to have the task are in the same group and at least one of them is synced with the module. Though most likely in MP if someone doesn't take that slot then it won't work.

Share this post


Link to post
Share on other sites

I believe so, yes. The player unit (who was the group leader) was able to see it but the other player was not.

Share this post


Link to post
Share on other sites
Have you guys changed the 'Apply to' section in the Create task module to 'Groups of synchronized objects'? That is, presuming that all players you want to have the task are in the same group and at least one of them is synced with the module. Though most likely in MP if someone doesn't take that slot then it won't work.

Yea, tried it with Groups of Synchronized Objects, still only shows up for host, and I also tried it as group member instead of leader.

Share this post


Link to post
Share on other sites

I just wanted to add that I tested the trigger option. That does seem to work to at least let everyone know what the tasks are.

They will pop up a few moments after the mission loads.

Share this post


Link to post
Share on other sites

Ok got this to work apart from 2 things, how do I get the tasks to appear on screen? Also, how do I get the task destination to show on the map?

Share this post


Link to post
Share on other sites

1. Do you mean the hint when complete? As in the first post, sync a Set Task State with whatever trigger you have for the condition, and also to the Create Task. Choose the type of hint from the menu.

2. Put down a Set Task Destination and sync it with the Create Task. In its menu you can choose to either have the destination where the module itself is placed, or synced with a unit or object where you want the waypoint. In the 'Marker' field of the Create Task you can type what you want the task waypoint to say, and also what it will say on the map.

Share this post


Link to post
Share on other sites

Works fine other than that there's no debriefing and when the debriefing screen shows up, the task is still unchecked despite fulfilling it, following the steps to the tip.

Share this post


Link to post
Share on other sites

First off, i hate the new tasks module, If it helps people no problem but I have been using the old briefing method and everything works fine except objectives not ticking off green when completed. hope they fix that soon.

Share this post


Link to post
Share on other sites

Can you set this to work with a building (like a radio tower?

---------- Post added at 03:46 PM ---------- Previous post was at 03:11 PM ----------

Also it seems that if you change any of the other fields in the trigger, the task stats checked and never changes either. On top of that if you modify the trigger effect to object, the target becomes invincible.

Share this post


Link to post
Share on other sites
...everything works fine except objectives not ticking off green when completed. hope they fix that soon.

Works flawless for me using something like

["TASKID", "SUCCEEDED"] call BIS_fnc_taskSetState;

in the completion trigger.

Edited by dga

Share this post


Link to post
Share on other sites

Tasks works perfectly. Also the green ticking works as it should.

Its just a matter of you how do it. I dont use the taskmodule.. I prefer to do it manual.

For example your objective will be to eliminate an officer.

- Place a Bluefor unit on the map that will be you

- Place an Opfor unit in front of the Bluefor and name him officer1 (its smart to not give him AMMO ;))

- Place a trigger with follow settings

AXIS A&B: 0
CONDITION: [i]!(alive officer1);[/i]
ON ACT: [i]hint "killed officer 1";MAG_tskObj0 setTaskState "SUCCEEDED";[/i]

Rest of the trigger settings just default

// This trigger checks if officer1 is alive, as soon he dies ON ACT will trigger the code we have put in.
// In this case it will hint you with text that the officer is dead. Also it sets MAG_tskObj0 to succeed, which means it ticks the object green. 
// You can see the MAG_tskObj0 code you need in the briefing.sqf a few steps below

- Place an other trigger with follow settings:

AXIS A&B: 0
CONDITION: [i]taskState MAG_tskObj0 == "SUCCEEDED"[/i]
ON ACT: [i]nul = execVM "end.sqf";[/i]

Rest of the trigger settings just default

- Now save the mission

- Go to your mission folder. Example : C:\Users\YOURUSERNAME\Documents\Arma 3 Alpha\missions\YOURMISSIONNAME.Stratis

- Make a file called init.sqf and put execVM "briefing.sqf" on the first line and save it.

- Make a file called end.sqf and put the follow code in it and save it:

cutText ["Mission Complete!", "BLACK OUT",15];
sleep 20;
endMission "END1";

// As soon you kill the officer this file will be executed and you will see a message on screen + the screen will fade black for 15 sec and the mission ends.

- Make a file called briefing.sqf and put the following code in it and save:

waitUntil {!(isNull player)};
waitUntil {player==player};
switch (side player) do
{
case WEST:
{
MAG_tskObj0=player createSimpleTask ["kill officer"];
MAG_tskObj0 setSimpleTaskDescription ["Kill the officer at all costs to let the mission end","kill officer","kill officer"];
player setCurrentTask MAG_tskObj0;
};
case EAST:
{
};
case RESISTANCE:
{
};
case CIVILIAN:
{
};
};

// Briefing tool: http://www.armaholic.com/page.php?id=6797 

- Now start the mission in the editor and KILL the Officer and you should have tasks + mission should end + objective ticked green.

The mission I just made in the example above : Example.Stratis.rar

For the briefing.sqf you can aswel use this tool: http://www.armaholic.com/page.php?id=6797

Edited by m0nkm0nk

Share this post


Link to post
Share on other sites

Well, my problem has been always to make that work on MP (From Arma 2, I asked a week ago who to do it)

Is the new system working for Multiplayer in a Good way? I mean, maybe we can create a briefing SQF but, instead of using the old "MAG_tskObj0=player createSimpleTask ["kill officer"];" we can use the new fuctions?

Share this post


Link to post
Share on other sites

As the guy who designed their current implementation, I must apologize for the confusion. This was one of the first proper frameworks I worked on when I began work on Arma 3. :p It will be improved in the future, hopefully accompanied by some more general documentation of how modules now work.

So, to give a basic tutorial of how it currently works:

Let's say we have a mission where the objective is to destroy an enemy vehicle. It's a 4-player coop, all players have the same objective and they're all in the same squad.

  1. Insert the Create Task module, fill in the details as desired.
  2. Change Apply to to Synchronized objects only.
  3. Synchronize the module to each of the player units.
  4. Insert the Set Task State module, set the State to Assigned.
  5. Synchronize to the Create Task module.
  6. Insert the Set Task Destination module, set the Destination to Synchronized object.
  7. Synchronize to the Create Task module and the enemy vehicle.
  8. Insert a Trigger, change it's Condition to !(alive truck1) (change truck1 to the name of the vehicle)
  9. Insert another Set Task State module, set the State to Succeeded.
  10. Synchronize to the Create Task module and the Trigger.

This should create the task for all players, set it as current, set the vehicle as its destination, wait for the vehicle to be destroyed and then mark it as succeeded. Hope that helps!

  • Like 3

Share this post


Link to post
Share on other sites

Zipper,

Will that still work if I attach the create task module to a building already on the map? I want to create a mission to destroy a radio tower.

EDIT: Or an ammo box to simulate taking out an ammo dump.

Share this post


Link to post
Share on other sites

Detecting an ammo crate's destruction would be just as easy. Detecting if an object placed in the Stratis map itself is destroyed is bit more complicated, but still possible. If, for example, you wanted to make the object to destroy the radio tower on the northern part of Agia Marina, you'd want to do something like this:

  1. Define the tower itself using the nearestObject command, e.g. ZP5_tower = [3063.95,6187.42,0] nearestObject "Land_TTowerBig_1_F".
  2. Change the Set Task Destination module's Destination to Module position and place it over the target.
  3. Change the Trigger's Condition to !(alive ZP5_tower).

Share this post


Link to post
Share on other sites

I also get the same issue as I got with OP's process. It doesn't show task as complete once the vehicle is destroyed.

Share this post


Link to post
Share on other sites
As the guy who designed their current implementation, I must apologize for the confusion. This was one of the first proper frameworks I worked on when I began work on Arma 3. :p It will be improved in the future, hopefully accompanied by some more general documentation of how modules now work.

So, to give a basic tutorial of how it currently works:

Let's say we have a mission where the objective is to destroy an enemy vehicle. It's a 4-player coop, all players have the same objective and they're all in the same squad.

  1. Insert the Create Task module, fill in the details as desired.
  2. Change Apply to to Synchronized objects only.
  3. Synchronize the module to each of the player units.
  4. Insert the Set Task State module, set the State to Assigned.
  5. Synchronize to the Create Task module.
  6. Insert the Set Task Destination module, set the Destination to Synchronized object.
  7. Synchronize to the Create Task module and the enemy vehicle.
  8. Insert a Trigger, change it's Condition to !(alive truck1) (change truck1 to the name of the vehicle)
  9. Insert another Set Task State module, set the State to Succeeded.
  10. Synchronize to the Create Task module and the Trigger.

This should create the task for all players, set it as current, set the vehicle as its destination, wait for the vehicle to be destroyed and then mark it as succeeded. Hope that helps!

Hello, i did ( again and again ) exactly what you say ( just changed the vehicule by a soldier ). But it won' t work properly for me : i have the task in the objectives window ( a good point ), but it is nowhere ingame, no marker on the map. When i kill the soldier, it say nothing, no succeeded, and the task is always active.

Edited by HSTaran
spelling

Share this post


Link to post
Share on other sites

For number 6

I changed it to module position, the task waypoint showed on the map, and the task did change it's outline when selected!

Maybe try that mate!

Question for Zipper5

Zipper, should I number the task 0,1,2 etc or 1,2,3 etc?

Also, with the number convention, if 1 succeeds, would 2 automatically become live?

Thanks

Edited by marker

Share this post


Link to post
Share on other sites
For number 6

I changed it to module position, the task waypoint showed on the map, and the task did change it's outline when selected!

Maybe try that mate!

Question for Zipper5

Zipper, should I number the task 0,1,2 etc or 1,2,3 etc?

Also, with the number convention, if 1 succeeds, would 2 automatically become live?

Thanks

That does not work either. I feel that the task have no link with the enemy. Therefore the task don' t appears ingame ( only on objectives window, but no waitpoint showed, no succeeded if i terminate the enemy ).

Edited by HSTaran

Share this post


Link to post
Share on other sites
Here's an image

Make sure the name of the unit is spelled correctly in the trigger.

To be sure i did not make a mistake : My target is a Medic. Therefore my script is !(alive Medic) ? or must I rename the medic and use it in the script ?

The problem is i tryed the two things without effect...

I didn' t see the screenshot. Thanks, i ll try to do exactly the same.

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

×