Ghost 40 Posted December 31, 2009 (edited) Makes sense. Now If i run the "TASKMASTER_add" command on a server only script will it update the clients already in the mission or just the jip clients? **update** Ran a test solo on dedi again and it seems that jip clients and current clients are not updated to tasks ran on server only scripts. If it was possible to do this it would make scripting missions a lot easier. Edited December 31, 2009 by Ghost Share this post Link to post Share on other sites
shuko 59 Posted December 31, 2009 Yep, that would require rewriting more or less the whole thing. I can give it a go, but until then, use a workaround to tell all clients about the addition. Share this post Link to post Share on other sites
galzohar 31 Posted December 31, 2009 You could do it so that tasks are synced every time a task is added/changed in some way rather than sync only on JIP. Then you just need to make sure you're not creating duplicates. Share this post Link to post Share on other sites
Ghost 40 Posted January 1, 2010 i am trying to create/delete triggers and in the onact line of the trigger which is ran on every client I want to update the current pubvar task _trg=createTrigger["EmptyDetector",_objmarker]; _trg setTriggerArea[0,0,0,false]; _trg setTriggerActivation["EAST","PRESENT",false]; _trg setTriggerStatements["objtrigger", "nul = [""(ghst_actobj select 0)"",""succeeded""] call TASKMASTER_upd; forceEnd; ghst_randomobj = [] execvm ""dta\scripts\randomobj.sqf"";", "deleteVehicle _trg;"]; problem is the method i used does not update the task. Ghst_actobj is an array that is pubvar updated with every new objective. So since your taskupdate requires the taskname to be a string. how do I go about doing so so that it would work in a scripted trigger as shown? I tried _actobj = str(ghst_actobj); and tried doing that again to put double quotes but nothing seems to work. So far besides my scripting issues your task system seems to work well. Share this post Link to post Share on other sites
shuko 59 Posted January 1, 2010 Ghst_actobj is an array, but what does it have inside? If it has just strings of the tasknames, then try as simple as this: "nul = [(ghst_actobj select 0),""succeeded""] call TASKMASTER_upd; forceEnd; ghst_randomobj = [] execvm ""dta\scripts\randomobj.sqf"";" Shouldn't require any quotation marks if the select already returns a string. Share this post Link to post Share on other sites
Ghost 40 Posted January 1, 2010 Ghst_actobj is an array but no strings are inside. I could make it that way though. Share this post Link to post Share on other sites
shuko 59 Posted January 1, 2010 So, what exactly is select 0 returning? Share this post Link to post Share on other sites
Ghost 40 Posted January 1, 2010 well if i do not use select 0 then i will return [1] for instance instead of 1 Share this post Link to post Share on other sites
shuko 59 Posted January 1, 2010 Yes yes, but what is the real data you are storing in the array. Are they numbers or what? Share this post Link to post Share on other sites
Ghost 40 Posted January 1, 2010 I am storing numbers which in turn act as names to markers. the numbers are the task number and marker name once put into a string. Share this post Link to post Share on other sites
shuko 59 Posted January 1, 2010 Did you try format command? Like: nul = [format [""%1"",(ghst_actobj select 0)],""succeeded""] call TASKMASTER_upd; And if the task name is something other than just a single number as a string, like Task1 for example: nul = [format [""Task%1"",(ghst_actobj select 0)],""succeeded""] call TASKMASTER_upd; Share this post Link to post Share on other sites
Ghost 40 Posted January 1, 2010 I will have to mess with it. Thank you for your help but at this point I think my problem is not with your script but with mine and locality (server/client scripting) Thanks again shk. Share this post Link to post Share on other sites
galzohar 31 Posted January 2, 2010 If all you want is "1" then you can use str 1, you don't need to use format. Share this post Link to post Share on other sites
zonker3210 1 Posted February 1, 2010 Is there a way to add line breaks in notes when using Taskmaster? For example, let's say I'd like a note to consist of two paragraphs...how would I do that? Is it supported? I've tried using \n but that didn't work. Thanks! Share this post Link to post Share on other sites
shuko 59 Posted February 1, 2010 The same way as you add them in any other way of creating briefing, which is same as in HTML: line1<br />line2 para1<br /><br />para2 Share this post Link to post Share on other sites
zonker3210 1 Posted February 1, 2010 Thanks for the quick reply, shk....and thanks for the excellent mission resources, too! ;) Share this post Link to post Share on other sites
VanhA-ICON 11 Posted February 3, 2010 (edited) Hi Shuko and thanks a million once more for taskmaster. I do have a problem in a mission I'm unable to solve. It involves a trigger which: 1. Cancels a task 2. Makes another task as "succeeded" 3. Creates a new task nul = ["tsk3","Canceled"] call TASKMASTER_upd;nul = ["tsk4","Succeeded"] call TASKMASTER_upd;obj4 = true;publicVariable "obj4";nul = ["WEST","tsk5",["Head fast to the depot and protect it!","Protect the depot and kill the attackers"],"cp3"] call TASKMASTER_add; The created task won't come up at all but still the game counts it as succeeded when players do what is supposed to do. It's just that it's not shown on briefing and does not give the "Succeeded" message when completed. What am I doing wrong? I tried to search a typo but my eyes were bleeding from testing... ....EDIT: Never mind, lol... is it the third parameter missing before the marker? I must be blind. Well, that's what the endless tuning and testing causes sometimes. Edited February 3, 2010 by VanhA-ICON Mistake Share this post Link to post Share on other sites
shuko 59 Posted February 3, 2010 (edited) So, you got it to work? If not, tell me and I'll check it out. Might want to try to create it for WEST instead of "WEST". I did some changes to the conditions at one point. Edited February 3, 2010 by Shuko Share this post Link to post Share on other sites
VanhA-ICON 11 Posted February 3, 2010 So, you got it to work? If not, tell me and I'll check it out.Might want to try to create it for WEST instead of "WEST". I did some changes to the conditions at one point. Oh, man... that's it of course. The previous task also created on the fly works because of WEST being without the quotes. Thank you. Share this post Link to post Share on other sites
BigMorgan 11 Posted March 3, 2010 This is a really great tool. Thanks for your hard work. Share this post Link to post Share on other sites
Buzz_Fledderjohn 0 Posted May 17, 2010 Bump. I need some help in getting this to work. Maybe I'm missing the point here, and I definitely suck at scripting, so bear with me. My mission has 4 objectives, all of which are checked by triggers. They are named: tsk_village, tsk_quala1, tsk_quala2 and tsk_quala3. I'm thinking of adding another trigger that activates once all 4 objectives are completed, using it to end the mission. However, I'm not sure if that is necessary for this script. My init.sqf is currently as follows: [[ [WEST,"Sweep village & Destroy crates",["Neutralize all enemies in this village and destroy both weapon caches.","Sweep village & Destroy crates","Sweep village"], [WEST,"Destroy weapon cache",["Our UAV spotted a weapon cache in Quala 1 as well. Destroy it.","Destroy weapon cache","Destroy weapon cache"], [WEST,"Neutralize Taliban in Quala 2",["Taliban insurgents have been using this quala as a stronghold. Kill them all.","Neutralize Taliban in Quala 2","Neutralize Taliban"], [WEST,"Neutralize Taliban in Quala 3",["Enemies have been spotted in this quala. Take them out.","Neutralize Taliban in Quala 3","Neutralize Taliban"]] ],[ ["true",["Note1","Note 1 text field"]], ["true",["Note2","Note 2 text field"]] ]] execvm "briefing.sqf"; Now, my question is: how do I link these briefing entries to my triggers? The script needs to know when those triggers are activated in-game in order to check off the tasks, doesn't it? Thanks. Share this post Link to post Share on other sites
W0lle 1050 Posted May 17, 2010 First off, I would change the tasknames in the init.sqf: [[ [WEST,"tsk_village",["Neutralize all enemies in this village and destroy both weapon caches.","Sweep village & Destroy crates","Sweep village"], [WEST,"tsk_quala1",["Our UAV spotted a weapon cache in Quala 1 as well. Destroy it.","Destroy weapon cache","Destroy weapon cache"], [WEST,"tsk_quala2",["Taliban insurgents have been using this quala as a stronghold. Kill them all.","Neutralize Taliban in Quala 2","Neutralize Taliban"], [WEST,"tsk_quala3",["Enemies have been spotted in this quala. Take them out.","Neutralize Taliban in Quala 3","Neutralize Taliban"]] ],[ ["true",["Note1","Note 1 text field"]], ["true",["Note2","Note 2 text field"]] ]] execvm "briefing.sqf"; Now when the first objective is completed you mark it as done using: nul=["tsk_village","succeeded"] call TASKMASTER_upd; in the trigger which checks if the objective is done. Repeat this for the other 3 objective triggers. Share this post Link to post Share on other sites
Buzz_Fledderjohn 0 Posted May 17, 2010 Thanks. I didn't know that that syntax after "WEST" should be the name of the trigger. That isn't explained very clearly in the readme imo. I'll try that out. Also, I assume that with this bit: ["true",["Note1","Note 1 text field"]], ["true",["Note2","Note 2 text field"]] ... you create the text for a 'briefing' entry in the briefing, right? Share this post Link to post Share on other sites
W0lle 1050 Posted May 17, 2010 Exactly. Like in my template: [[ [WEST,"t_obj1",["Long_task_description.","Short_task_description","HUD"]], [WEST,"t_obj2",["Long_task_description.","Short_task_description","HUD"]], [WEST,"t_obj3",["Long_task_description.","Short_task_description","HUD"]] ],[ [WEST,["Situation","Situation text goes here"]], [WEST,["Mission","Mission text goes here"]] ]] execVM "briefing.sqf"; The part after WEST in the tasks is just the "handle" for the script which to address a certain objective. You can name it whatever you like. Share this post Link to post Share on other sites
shuko 59 Posted May 18, 2010 Thanks Wolle. :) If someone has any suggestions how to make the readme more clear, I'm all ears. ;) Share this post Link to post Share on other sites