Jump to content

Recommended Posts

Wasn't aware of that. The new task notifications need updated code, and I was under the impression Shuko didn't make the jump to Arma 3 (sadly).

Yeah I thought it would be one of the things that wouldn't work but yeah it does (if you mean the Task Assigned: etc. in different colours that comes up in a box). And yeah I asked shuko if he would be making an Arma 3 version but he said he has no interest in Arma 3 which is a shame. One other thing that doesn't work with it although it seems like an Arma 3 problem as I've tried doing it myself unsuccessfully, is creating markers during a mission. It either gives an error or just doesn't create the marker, I've tried doing it through scripts and triggers and it just won't work.

Edited by clydefrog

Share this post


Link to post
Share on other sites
How does this compare to Taskmaster 2? Can you create tasks for different unit names, groups, factions? Is there anything it has over taskmaster or anything important that taskmaster has over this?

I wrote this script because for one, I had problems with the one I used before (it sometimes failed to transmit all tasks, IIRC) and wasn't keen on debugging someone else's code, and secondly I wanted certain functionality and compatibility (to be able to adapt it to Iron Front as well, for example).

If you read the README, you will see how to use it to create tasks for different units, groups, factions or any unit that matches a given code fragment.

Share this post


Link to post
Share on other sites
Yeah I thought it would be one of the things that wouldn't work but yeah it does (if you mean the Task Assigned: etc. in different colours that comes up in a box).

Ah, no, I meant these.

It either gives an error or just doesn't create the marker, I've tried doing it through scripts and triggers and it just won't work.

I tried that and for me it worked. The name of the markers might have changed, though, I don't remember exactly.

Share this post


Link to post
Share on other sites
Ah, no, I meant these.

I tried that and for me it worked. The name of the markers might have changed, though, I don't remember exactly.

Oh nice, I don't even think I've seen those before.

Ok, well I did use marker names from the arma 3 config thing but they still wouldn't work, I'd love to know how to get it working.

Share this post


Link to post
Share on other sites

Is there anything I need to do to insure Join in Progress clients get the previously assigned tasks?

I have no idea on how to test if its working correctly but here's how my mission is setup:

Server starts, init.sqf exec's a MissionProcessor.sqf

init.sqf

call compile preprocessFileLineNumbers "fhqtt.sqf";

call compile preprocessFileLineNumbers "NetworkFunctions.sqf";

if (isServer) then {
execVM "MissionProcessor.sqf";
};

The server-ran MissionProcessor.sqf randomly picks a marker, a mission, then a FHQ task is created and assigned on all clients.

MissionProcessor.sqf

[missionType, taskNum] call lampCreateNewTaskAll;

NetworkFunctions.sqf:

// Executed on all machines.
lampCreateNewTask = {
   private ["_missionType", "_taskNum"];

   _missionType = _this select 0;
   _taskNum = _this select 1;

   // Code goes here!
   private ["_markerNum", "_taskType", "_taskObject"];
   _markerNum = _missionType select 0;
   _taskType = _missionType select 1;
   _taskObject = _missionType select 2;
   [
       [
       format ["%1%2", _taskType, _taskNum], //task name
       format ["Mission %1, %2 %3", _taskNum, _taskType, _taskObject], //task long desc
       format ["%1 %2", _taskType, _taskObject], //task short desc
       format ["%1 %2", _taskType, _taskObject], //Marker Text
       getMarkerPos _markerNum, //task waypoint
       "assigned" //task state
       ] 
   ] call FHQ_TT_addTasks;
};

The MissionProcessor.sqf waits for the mission to complete then completes the task for all clients. Then it loops back and starts over again.

MissionProcessor.sqf

waitUntil {!isNil "missionSuccess"};
   if (missionSuccess) then {
       [taskNum, missionType] call lampCompleteTaskAll;
   };
   if (!missionSuccess) then {
       [taskNum, missionType] call lampTaskFailedAll;
   };

How can I assure a client who joins in progress gets the current mission? With the FHQ framework, is this already covered for me or are there extra steps to take?

Edited by zuff

Share this post


Link to post
Share on other sites

I am also having a JIP issue. The system works brilliantly if everyone is in the lobby / briefing before the mission commences.

I am detecting JIP players and they are having the briefing added fine with FHQ_TT_addBriefing.

Even executing the FHQ_TT_addTasks in the JIP script doesn't seem to add a task.

Code below is triggered only for JIP players (and once the player object is valid ) :

// add briefing works fine - adds to existing briefing script triggered from the init.sqf

[

player,

[

"JIP",

"I AM A JIP PLAYER"

]

] call FHQ_TT_addBriefing;

// add task fails (player, west makes no difference)

[ player,

[

"task_objective1jip",

"This is a test JIP task",

"This is a test JIP task",

"",

getMarkerPos "mkrTaskmarker"

]

] call FHQ_TT_addTasks;

if (true) exitWith {};

Any help would be muchly appreciated.

Share this post


Link to post
Share on other sites

I did test with JIP and had no issues. I'll take a look at it when I get the time.

Note, though, that tasks are never done on a per-client basis. They are tied to units, and even though a client joins in progress, they do take over an existing unit that already has tasks assigned by the server.

Share this post


Link to post
Share on other sites

Well I've read through the pdf file but I'm unsure which function I use if I want to create a new task through a trigger. Do I just use "call FHQ_TT_addTasks;" the same as you do in the init.sqf? So for example in a trigger onAct I would have:


[west,["TaskExfil","Get to the helicopter and leave the island","Exfil","MOVE", getMarkerPos "LZ","assigned"]] call FHQ_TT_addTasks;

and that's it?

Edit: Tested that and it works nicely, I'm liking this system so far. One thing that would be nice though that it doesn't seem to have - Taskmaster has the call SHK_Taskmaster_hasState function, so you can check for any task having any type of state for use as a condition etc. for example ["Task1","assigned"] call SHK_Taskmaster_hasState.

Is there any chance of getting a function like that in there too?

Edited by clydefrog

Share this post


Link to post
Share on other sites

I can confirm that tasks are not working for JIP.

I created a task during the mission on the server, which FHQ did a good job of broadcasting it to all of the clients, but when someone joined in later they did not get the task. They did get the next task when it was created, but current/assigned tasks are not being sent to the client.

Any clue what I can do to insure a JIP gets a currently assigned task?

Edited by zuff

Share this post


Link to post
Share on other sites
I can confirm that tasks are not working for JIP.

I created a task during the mission on the server, which FHQ did a good job of broadcasting it to all of the clients, but when someone joined in later they did not get the task. They did get the next task when it was created, but current/assigned tasks are not being sent to the client.

Any clue what I can do to insure a JIP gets a currently assigned task?

Was that on Arma 2 or Arma 3 ?

The script has been used on all of our missions lately, and we never had any problems with it.

Sorry, couldn't check earlier, just came home. I'll test ASAP

Share this post


Link to post
Share on other sites

Arma 3. Let me know if you want any more info. Thanks.

Share this post


Link to post
Share on other sites

just a curiousity about people who are reporting JIP issues. Is this caused because instead of putting group name or defining the SIDE you want to broadcast the script on and defining it as player causes JIP issues instead? I'm thinking that if you just broadcast it to player it'll just send it to the players who already there but no JIP but when you broadcast it to the side or group, it'd be to all members including AI. Is that the case? I'm just hypothesizing, but I haven't tested that yet.

Share this post


Link to post
Share on other sites
just a curiousity about people who are reporting JIP issues. Is this caused because instead of putting group name or defining the SIDE you want to broadcast the script on and defining it as player causes JIP issues instead? I'm thinking that if you just broadcast it to player it'll just send it to the players who already there but no JIP but when you broadcast it to the side or group, it'd be to all members including AI. Is that the case? I'm just hypothesizing, but I haven't tested that yet.

I've been defining it to West. Still issues.

Share this post


Link to post
Share on other sites

How do I go about assigning a task again after and addtask has been assigned. I'd like 2 assigned or something that I can get 2 task completed at the same time. eg kill enemy colonel in the villa that needs to be destroyed. 2 task taken out in one go.

Share this post


Link to post
Share on other sites
How do I go about assigning a task again after and addtask has been assigned. I'd like 2 assigned or something that I can get 2 task completed at the same time. eg kill enemy colonel in the villa that needs to be destroyed. 2 task taken out in one go.

The demo mission shows you how to have 2 tasks assigned which when done will give notifications for both the main task being completed and the 2 sub tasks being completed.

Edited by clydefrog

Share this post


Link to post
Share on other sites

Regarding JIP problems:

I just tried here, and it works perfectly for me, even with the relatively new support for parent tasks (which I haven't used yet).

So I'm really puzzled about your problems here.

zuff, can you perhaps construct a repro mission, or send me that mission you have problems with ? And do you use the DEV build or the regular Arma 3 Alpha ?

Share this post


Link to post
Share on other sites

Hello,

I have a question about this new function tasks code that BIS has implemented:

How can I created a task only when the previous one has been completed? Do I use the "If" statement? If so, can you provide an example?

Thanks in advance.

Share this post


Link to post
Share on other sites
How can I created a task only when the previous one has been completed? Do I use the "If" statement? If so, can you provide an example?

Well, normally, there will be some entity (like a trigger or another script) that will mark a task as completed. You can create a new task in the same script, like this:

["firstTask", "succeeded"] call FHQ_TT_setTaskState;

[ ["secondTask", "Description of second task", "Short description", "", "assigned"] ] call FHQ_TT_addTask;

Alternatively, you can have a script that is executed from time to time (through some other trigger or even on a timer) that checks if the task is completed and creates a new one:


if (["firstTask"] call FHQ_TT_isTaskCompleted) then 
{
   [ ["secondTask", "Description of second task", "Short description", "", "assigned"] ] call FHQ_TT_addTask;
}

Hope this helps

Share this post


Link to post
Share on other sites

Hey varanon thx for your nice script. Its working great in my mission ;)

There is just one thing maybe you could help me with. I have also the =BTC= Revive scripting my mission and when one player is dying and got revived he no longer can see these nice hints when a task is new given or accomplished.

is there something i can call from the script so the revived player gets the satus over all tasks ?? and then gets new initiated .... omg i hoppe you can understand my problem ;)

Ok im no crack at this skripting and making my first steps at the moment ... so when you have a answer for me ... maybe you can keep it simple :o

Share this post


Link to post
Share on other sites
Well, normally, there will be some entity (like a trigger or another script) that will mark a task as completed. You can create a new task in the same script, like this:

["firstTask", "succeeded"] call FHQ_TT_setTaskState;

[ ["secondTask", "Description of second task", "Short description", "", "assigned"] ] call FHQ_TT_addTask;

Alternatively, you can have a script that is executed from time to time (through some other trigger or even on a timer) that checks if the task is completed and creates a new one:


if (["firstTask"] call FHQ_TT_isTaskCompleted) then 
{
   [ ["secondTask", "Description of second task", "Short description", "", "assigned"] ] call FHQ_TT_addTask;
}

Hope this helps

Thank you so much I finally made it! This was killing my brain so much! :o

Share this post


Link to post
Share on other sites
Ok im no crack at this skripting and making my first steps at the moment ... so when you have a answer for me ... maybe you can keep it simple :o

I'm not quite sure how the respawn is handled with this script. Usually, tasks are created on a per unit basis, meaning that if you create a task for a unit, and switch to that, you should have the unit's tasks.

Depending on how they are implemented, a revive script creates a new unit and adds it to the switchable units. If that's the case, the newly created unit does not have the tasks, since it wasn't existing at that time.

Since I never made respawn missions, I didn't think about such a case... I'll add appropriate functionality.

Share this post


Link to post
Share on other sites

Ok so i think this is exactly what is happening. I remember that i have Read in the thread of the revive that the Player dies and get new created. He has doen this cause he wants the regdoll effects that only happens if the player dies ! I will ask him if ther is a possobiliety too ad a init too the new spwned player. Maybe ther is a chance to implement a call for the FHQ TaskTraker.

When i read the your FHQ .... maybe with the markTaskAndNext Function so that every task get checkt and when for example task 3 is still not assigned task will then get assigned too the new player. Is this possible ? Or is ther a special int and the FHQ have too pic up the player in the beginning. I think this is maybe just like a JIP player.

I don't know but i will inform you what the revive guy coming up with ;)

Edited by R0T

Share this post


Link to post
Share on other sites

Varanon

I'll put together a quick example mission tonight if I get the time and send it to you. I'm really stumped on this JIP stuff.

Did you look through my last post which shows basically all of the mission code?

Share this post


Link to post
Share on other sites

I have all tasks complete for all team members in MP, but i find only 1 of them get the taskhint showing up on screen. Is there anything I can do about this, or is it just alpha?

Share this post


Link to post
Share on other sites
I have all tasks complete for all team members in MP, but i find only 1 of them get the taskhint showing up on screen. Is there anything I can do about this, or is it just alpha?

Normally, all should get it (and they do, I have tested that). Note that the task must be marked on the server, otherwise, only the client marking the task sees it.

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

×