Jump to content

Recommended Posts

FFS.

Does anyone have an example mission where these bloody things will work with a dedicated server. I changed the init file back to use the precompile command (as in the sample mission) and now I don't get any tasks, but when I used the init file from one of my arma2 missions I got tasks at the start but not after jip or respawn.

If the dev hasn't got time to test in arma3, does anyone know a task system that will work for JIP and respawn?

You would think BIS could have sorted this out. The servers can remember who has what gun, where players are, and public vars. You would thing they could turn the tasks in to something remembered by the server, that clients would query on join or respawn.

***

Edit

***

I have found FHQ TaskTracker which works a treat for Jip and respawn on a dedicated server. If you try it, make sure you use the thread on the forums, as the examples in the script have a few typos, so a straight copy n paste wont work.

Taking nothing away from Taskmaster though, but it doesn't seem as good as it was for arma2.

***********

Cheers

GC

Edited by Cloughy

Share this post


Link to post
Share on other sites

I don't have an example mission at the moment, but it always worked flawlessly here in any scenario, dedicated server or not.

-----------------------------------------------------------------------------------------------------------------------

PS: Oh yeah, nevermind all that below. Taskmaster still works great within this "system" of mine. I was having problems with reusing triggers.

For future reference: triggers are global. Everyone should read this. I'm creating these triggers serveside and PV'ing them - that way I won't end up with several... a truckload of unnecessary triggers and I'm also able to have different trigger statements for each client, while they're using the same one trigger.

But... I intend to reuse them. And deleting them afterwards with deletevehicle does not suffice. You have to nil them, and that's what I wasn't doing prior to defining them with the same name within the same script once again.

Hope my monologue is useful to anyone in the future :lol:

-----------------------------------------------------------------------------------------------------------------------

What troubles me now may not even be related to Taskmaster itself. I have this set up:

if (isServer) then {

switch (playableUnits select X) do {

case player1: {["tsk5_id1","Do Whatever","",player1] call SHK_Taskmaster_add;};

case player2: {["tsk5_id2","Do Whatever","",player2] call SHK_Taskmaster_add;};

};

};

And it works great. I'm calling an array based on playableUnits, returning the player engaging in the mission, and the task is given only to this specific player.

Sometimes I'll add a second switch for a second player:

if (isServer) then {

switch (playableUnits select X) do {

case player1: {["tsk5_id1","Do Whatever","",player1] call SHK_Taskmaster_add;};

case player2: {["tsk5_id2","Do Whatever","",player2] call SHK_Taskmaster_add;};

};

sleep 5;

switch (playableUnits select Y) do {

case player1: {["tsk5_id1","Do Whatever","",player1] call SHK_Taskmaster_add;};

case player2: {["tsk5_id2","Do Whatever","",player2] call SHK_Taskmaster_add;};

};

};

It still works great, but these missions are replayable. Players can redo them on demand, while never leaving the game.

And that's when task notifications start acting funny. First situation above still works great. But, whenever I have more than one switch for different players, as they replay the same mission, the task notifications will pretty much always multiply themselves. The task state itself remains as it should be, but the notifications are VERY misleading.

I know, yes, task multiplication is in the "known issues", and mentions publicVariables and MP syncing. But this will happen to me even in the editor preview, only when I have the second switch added, no matter how long that sleep is.

Of course recreating, adding the same task multiple times, is probably not intended behavior. But maybe there's a way to minimize the issue?

Edited by rakowozz

Share this post


Link to post
Share on other sites

Hey..

While helping someone that had issues with an RPT spam in a mission about a "generic error in expression", I checked what the problem was and found out that SHK_taskmaster doesn't react favorable if your input array of task names contains a task that doesn't (yet) exist. So, if you check for

["Task1", "Task2] call SHK_TaskMaster_isCompleted

when Task2 hasn't been created yet, it would give a generic error in line 512.

As a proposal to make this more robust and react favourable to dynamically generated tasks, I would propose the following change to the function:

SHK_Taskmaster_isCompleted = {
   /*   Checks if task(s) are completed.
    In: string               Task name
    In: array of strings     Task names
   Out: boolean
   */
   private ["_b","_t","_i","_foreachIndex"];
   _b = false;
   if (typeName _this == typeName "") then {
     _this = [_this];
   };

   {
     _t = _x;
     _i = _foreachIndex;
     {
       if (_t == (_x select 0)) then {
         if ((_x select 5) in ["succeeded","failed","canceled"]) then {
           _this set [_i,true];
         } else {
           _this set [_i,false]
         };
       } else {                              // NEW: Set unknown tasks names to false to prevent error message
           _this set [_i, false];          // Usually, passing a wrong task name is an error, but it shouldn't give a script error
       };                                      // and this will allow to check dynamic tasks
     } foreach SHK_Taskmaster_Tasks;
   } foreach _this;

   if ({_x} count _this == count _this) then {
     _b = true;
   };

Just an idea :)

Share this post


Link to post
Share on other sites

I cant figure out why but when I try to make a new task with this- ["Task1","Drive","Drive like mad",["markerTask1",getmarkerPos obj1,"selector_selectedMission","ColorRed","Gravia","Icon", 2]] call SHK_Taskmaster_add; It will not work. I take off the marker info and it will add a new task but no marker for team to see. I have a marker named obj1 in the center of the city where I would like to have the Task destination. Please help.

Edited- Dont know why but I got it to work using X,Y,Z positions instead of marker.

Edited by mech79

Share this post


Link to post
Share on other sites

Just an idea :)

I'm traveling at the moment, but I'll look into it once I get home. Thanks for the function!

PS. Maker should know which tasks have been created at certain time, and only check those. ;)

Share this post


Link to post
Share on other sites

PS. Maker should know which tasks have been created at certain time, and only check those. ;)

Agreed, it's just more convenient to be able to have this e.g in a trigger without having the task already ç created in the first place. Not a bug, but a convenience feature :-)

Share this post


Link to post
Share on other sites

New version is up with Alwarren's isCompleted function.

Share this post


Link to post
Share on other sites
Guest

New version frontpaged on the Armaholic homepage.

===================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Anyone have an mp mission to share that has this working properly? I've got a ST mission to port from A2 and this is most definitely necessary for my mission :)

Share this post


Link to post
Share on other sites
Thanks mech79 :)

Any questions just let me know

Share this post


Link to post
Share on other sites
Anyone have an mp mission to share that has this working properly? I've got a ST mission to port from A2 and this is most definitely necessary for my mission :)

All my Altis on Fire missions use it as well.

---------- Post added at 04:58 ---------- Previous post was at 04:56 ----------

Has anyone figured out a way to hand off a variable to SHK_Taskmaster_add for the Task Name? Writing up a script that will dynamically create tasks, so I'll need to generate the task name in script.

Share this post


Link to post
Share on other sites
Has anyone figured out a way to hand off a variable to SHK_Taskmaster_add for the Task Name? Writing up a script that will dynamically create tasks, so I'll need to generate the task name in script.

taskVarNum = 1; // from the upkeep of your dynamic tasks, or any other method of making and tracking of the tasks

[format ["myDynTask%1",taskVarNum],"you must do this","this is you duty, do it!"] call SHK_Taskmaster_add;

All the fields are text. So, should be pretty simple really. All you need to figure out is how you will create the dynamic tasks and how you keep track of them. By that I don't mean the UI part of tasks which Taskmaster adds, but the actual task with trigger/conditions etc.

Share this post


Link to post
Share on other sites

I can confirm this is working on a dedicated server.

Edited by ssechaud

Share this post


Link to post
Share on other sites

Im using this Beutifull scripts in all my Sp missions and work like a Charm, but im making a Coop Mission right now, and i play the coop in my Nitrados server, and the brief tasks are ok, but i cant Update the tasks status, or create any tasks... any help?

Briefing.sqf

[[
 ["Tskxtra","Evita las Bajas Civiles","     Es esta operacion trabajaremos codo con codo con la Insurgencia local, si normalmente somos restrictivos con las bajas civiles... esta ves mucho mas... asi que mira antes de disparar.",WEST],
 ["Tsk1","Exfiltrate","     Cuando Estes Listo para la extraccion, llama por radio a Ghost 0-1-1, ten en cuenta que debes marcarle Lz a Ghost 0-1-1 con una Baliza IR cuando el Te lo indique para que pueda aterrizar...",WEST],
 ["Tskseg","Establece La Seguridad","     <marker name='weqq'>Asegura</marker> el Perimetro antes de que se lleve acabo la reunion. Si Fox corre peligro la mision se ira al garete",west],
 ["Tsk0","Ve al Punto de Reunion","     <marker name='weqq'>Reunete</marker> con el comandante Insurgente y encargate de los Objetivos que te designe.",west]
],[
 ["SITUACION", "<br/>     El gobierno Altiano esta desesperado. Hace 2 años un movimiento separatista denominado como ELI (Ejercito de Liberacion Islamista) comenzo a realizar ataques terroristas selectivos en la pequeña Isla de Stratis. Al principio eran sofocados por las autoridades civiles de la isla, pero pronto se vieron desbordados y fue necesario desplegar al Ejercito Altiano. Tras varios enfrentamientos abiertos, los separatistas comenzaron a ganar terreno frente a un Ejercito totalmente vulnerable a la Guerra de Guerrillas. Tras el Primer año ya habian perdido todo el sur de la isla, actualmente solo dominan un pequeño campamento en Rogain el cual es continuamente asediado y su  porvenir pende de un hilo.<br/><br/>     Ante la desdesperacion, el Gobierno legitimo solicita ayuda internacional y debido a nuestras relaciones diplomaticas nos vemos forzados a prestarles apoyo militar. Esto no sera una invasion a gran escala, aunque diezmada debido a las emigraciones huyendo de los enfrentamientos, en Stratis aun hay poblacion civil, con lo cual debemos asestar pequeños pero contundentes golpes para debilitar las fuerzas del ELI y poco apoco recuperar el Terreno perdido hasta que podamos acabar con la amenaza definitivamente.",WEST]

]] execvm "scripts\shk_taskmaster.sqf";

updating tasks via script

["Tsk0","succeeded"] call SHK_Taskmaster_upd;
0 = execvm "intel\01.sqf";
sleep 1;
obj0ok=true;
["Tskseg","succeeded"] call SHK_Taskmaster_upd;

if(true) exitWith{};

Creating new tasks and conversation script (this script is "intel\01.sqf" executed in the above code...)

sleep 1;
contacto switchmove "ACTS_HUBABRIEFING";
contacto disableai "anim";
Contacto globalchat "Bien Yo soy Fox, No tenemos mucho Tiempo, Asi que me dejeare de formalidades e iremos al Grano...";
sleep 6;
Contacto globalchat "Presta atencion a la pizarra, te hare un resumen...";
sleep 4.4;
contacto Globalchat "Vale... Esta foto aerea a sido tomada de la base que tenemos al Sur-Este de nuestra posicion, ocupada por el Ejercito de liberacion Islamista";
"area1_2_1" setMarkerAlpha 1;
"area1_2" setMarkerAlpha 1;
"area1_1_1" setMarkerAlpha 1;
"area1_1_1_1" setMarkerAlpha 1;
"vipPos_1" setMarkerAlpha 1;
"vipPos" setMarkerAlpha 1;
sleep 3;
[nil, nil,"per", rSETOBJECTTEXTURE, board, 0, "intel\pictures\01.jpg"] call RE;
sleep 5;
contacto globalchat "En este edificio, se encuentra tu Objetivo Principal, Robert Mugabe, mas conocido como SAVIOR";
sleep 4;
[nil, nil,"per", rSETOBJECTTEXTURE, board, 0, "intel\pictures\03.jpg"] call RE;
sleep 1;
Contacto Globalchat "Es un mamonazo con muy mala hostia y muy pocos escrupulos... es el Responsable de la Ocupacion NorOeste de la Isla y de la masacre indiscriminada de muchos civies aqui... no quiero que vea la luz del sol nunca mas...";
sleep 5;
["Tsk2","Elimina y Confirma","     Debemos Eliminar a Robert Mugabe y confirmar su Muerte (mira al cadaver y te saldra una nueva opcion en en menu de rueda de raton), no se descarta que intente huir si somos descubiertos.",WEST] call SHK_Taskmaster_add;
sleep 2;
[nil, nil,"per", rSETOBJECTTEXTURE, board, 0, "intel\pictures\04.jpg"] call RE;
sleep 0.5;
[nil, nil,"per", rSETOBJECTTEXTURE, board, 0, "intel\pictures\05.jpg"] call RE;
sleep 2.5;
contacto globalchat "Despu?s de desacerte de nuestro amiguito... no estaria mal que dirigieras tus ojos esta otra parte... hay varios camiones cargados con mucho material Pesado, el cual me gustaria que desapareciese...";
sleep 5;
[nil, nil,"per", rSETOBJECTTEXTURE, board, 0, "intel\pictures\06.jpg"] call RE;
["Tsk3","Elimina los Suministros","     Ve a las cocheras de la base y destruye los camiones cargados de suministros, para ello usa a tu Especialista en explosivos.",WEST] call SHK_Taskmaster_add;
sleep 2;
contacto switchmove "ACTS_HUBABRIEFING";
[nil, nil,"per", rSETOBJECTTEXTURE, board, 0, "intel\pictures\07.jpg"] call RE;
sleep 0.5;
[nil, nil,"per", rSETOBJECTTEXTURE, board, 0, "intel\pictures\08.jpg"] call RE;
sleep 2.5;
contacto globalchat "Aunque seamos realistas... para llevar a cabo tu mision... primero tendras que entrar... y la entrada principal es poco recomendable... hay mucha luz, patrullas, centinelas... etc...";
sleep 4;
[nil, nil,"per", rSETOBJECTTEXTURE, board, 0, "intel\pictures\09.jpg"] call RE;
sleep 3;
[nil, nil,"per", rSETOBJECTTEXTURE, board, 0, "intel\pictures\10.jpg"] call RE;
sleep 0.5;
[nil, nil,"per", rSETOBJECTTEXTURE, board, 0, "intel\pictures\11.jpg"] call RE;
sleep 2;
contacto globalchat "lo mas viable es entrar desde el lado mas al sureste de la Base que esta mas oscuro, y asi podremos posicionarnos bien antes del asalto... o incluso entrar sigilosamente si teneis lo que hay que tener...";
sleep 2.5;
sleep 2.5;
[nil, nil,"per", rSETOBJECTTEXTURE, board, 0, "intel\pictures\12.jpg"] call RE;
sleep 5;
contacto Globalchat "Eso si... Nada de esto podra llevarse a cabo si no os desahaceis primero de esta peque?a fortificacion... yo encargaria este trabajo al equipo de apoyo... ya que asi despues de despejar la zona... Tendrian una excelente zona para batir objetivos...";
sleep 5;
[nil, nil,"per", rSETOBJECTTEXTURE, board, 0, "intel\pictures\13.jpg"] call RE;
sleep 3;
sleep 3;
contacto globalchat "Bueno eso es Todo, espero que seais capaces de dar la talla... Buena Suerte...";
sleep 10;
contacto switchmove "";
sleep 0.2;
contacto enableai "anim";
sleep 6;
["Tsk5","Limpia La Posicion","     Hay una Posicion defensiva justo aqui... limpiala y establece tu unidad en defensiva para apoyar por el fuego al otro equipo si fuese necesario.",West] call SHK_Taskmaster_add;
"rta_1_1_1" setMarkerAlpha 1;
"rta_1_1_2" setMarkerAlpha 1;
sleep 1;
reunionfin=true;

if(true) exitWith{};

all the conversation shown correctly, and the script runs till the end, but don't create any task :(

---------- Post added at 23:22 ---------- Previous post was at 22:52 ----------

ooops i Forget, the

nul = [["Tsk0","succeeded"], "SHK_Taskmaster_upd", false] spawn Bis_fnc_mp;

or the

nul = [["Tsk2","Elimina y Confirma","     Debemos Eliminar a Robert Mugabe y confirmar su Muerte (mira al cadaver y te saldra una nueva opcion en en menu de rueda de raton), no se descarta que intente huir si somos descubiertos.",WEST],"SHK_Taskmaster_add",false] spawn Bis_fnc_mp;

form dont works for me

Share this post


Link to post
Share on other sites

Version 0.42 is up.

Levrex contributed a function to check non-BIS factions.

As I have no addon factions myself, I'd be interested hearing how it works for those who do have.

Share this post


Link to post
Share on other sites
Guest

New version frontpaged on the Armaholic homepage.

===================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

deleted

Edited by benw

Share this post


Link to post
Share on other sites

It may be a simple answer but I can't figure this out, I would like to have a red circle 200 x 200 as the task marker rather than an icon, this is what I am using which does create a red circle but its really tiny, any help would be appreciated

["Task3","taskname","Locate and capture the enemy <marker name=""Scientist"">Scientist</marker>, bla bla bla.",true,["mrkObjective3",getmarkerpos "Scientist","empty","ColorRed","markertext","Ellipse","200"]]

Thanks

Tay-uk

Share this post


Link to post
Share on other sites

"200" is a string, not a number. Try without the quotation marks.

Share this post


Link to post
Share on other sites

Thank you for the prompt reply, knew it would be something simple, but unfortunately my knowledge of scripting is none existent until I see a working example, thanks again.

Share this post


Link to post
Share on other sites

Shuko on a mission I am building I am using a small object (a pencil) grouped with markers for randomness to spawn Hostages and enemy with a trigger. I can not find a way to get a task to update and place a marker at the objects location only a markers location. Since the object is randomly being placed at different marker possitions I can't just use a marker name. Am I missing something and can you please help me out with this. I though maybe run a script that created a new marker at the object once object was spawned? There has got to be a simpler way...lol.

Share this post


Link to post
Share on other sites

You can use objects, like this in the original post-

["Task2","Task2Title","Task2Desc",true,["markerTask2",getpos obj2]]

Your basically just changing "getMarkerPos" to "getPos" and the name of your pencil in the above example would be obj2

Share this post


Link to post
Share on other sites

Thanks It has been awhile since I have built a mission in Arma and missed that.

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

×