Razor91 17 Posted August 13, 2011 The problem is, if i do this in a stringtable.xml, it doesn´t work. Maybe a problem in the stringtable.xml... Share this post Link to post Share on other sites
Razor91 17 Posted August 13, 2011 (edited) I tried this one and still doesn´t work... Seems to be a problem with stringtable.xml. Edit: Found a solution, had to split the text into parts and connect them with + "<br/>" + Edited August 19, 2011 by Bier AIG Razor Solution found Share this post Link to post Share on other sites
cuel 25 Posted October 17, 2011 Hi. A few questions. Is the server supposed to do all of the Taskmaster_upd and _add etc? What happens if a client does it? I was thinking how to handle JIPs. If anyone can write a description the best way to handle them would be appreciated. Right now I have a trigger on the map with e.g (!alive person) and then it executes a sqf with ["task1", "succeeded"] call SHK_Taskmaster_upd; Share this post Link to post Share on other sites
totalboffin 10 Posted October 17, 2011 Hi there, Has anyone used this script on a dedicated server game? I'm trying to implement the taskmaster script. Everything works great on a locally hosted multiplayer game, but when I try to run on a dedicated server, only the initial tasks are setup for all players, when I try to add a task on the fly using the call SHK_Taskmaster_add; they fail to update for anyone. Am I missing something with how I should call this command when running on a dedicated server? totalboffin Share this post Link to post Share on other sites
Mustang_185 120 Posted October 24, 2011 (edited) Hi there, I've encountered strange problem with taskmaster (v.33). I made a briefing using it, and tested it by hosting lan server. The briefing is not visible on map screen - I have to start the mission to have all the tasks and notes loaded and visible. I tried asking more experienced mission makers what could be causing it, but they could not help me. I have no idea, what I could have done wrong, as yesterday I copy-pasted my init.sqf to other mission and then it worker flawlessly. Hope you guys can help me sort it out - here is my init.sqf: //Init UPSMON scritp (must be run on all clients) call compile preprocessFileLineNumbers "scripts\Init_UPSMON.sqf"; // ACE wounding system ace_wounds_prevtime = 600; ace_sys_wounds_withSpect = true; //Process statements stored using setVehicleInit processInitCommands; //Finish world initialization before mission is launched. finishMissionInit; [[ ["tskobj0","Sparalizowac lacznosc dalekiego zasiegu","Na szczycie gory niedaleko Zielenogorska znajduje sie <marker name='marker3'>stacja lacznosci</marker>. Jest zbyt solidna, abyscie zdolali ja wysadzic, tak wiec wybijcie jej obsluge i zaminujcie teren. To wylaczy ja z dzilania do czasu inwazji.","assigned"], ["tskobj1","Wysadzic radary wczesnego ostrzegania","Na terenie waszego dzialania znajduja sie dwa radary wczesnego ostrzegania:<br/><br/>- <marker name='sr'>Stacja 'Blysk'</marker><br/>- <marker name='st2'>Stacja 'Mrok'</marker>",EAST], ["tskobj2","Zabic generala","Wyeliminujcie generala Iwana Buchte. Czesto podrozuje on pomiedzy portem wojskowym a baza grupy szybkiego reagowania CDF. Buchta jest milosnikiem starych samochodow, najczesciej przemieszcza sie w starej, zabytkowej Woldze o czarnym nadwoziu.<br/><br/>Ten general jest glowym lacznikiem i koordynatorem dzialan pomiedzy CDF a USMC. Jego eliminacja znaczaco zmniejszy efektywnosc wspoldzialania tych dwoch sil",EAST], ["tskobj3","Unieszkodliwic punkt paliwowy","Na wybrzezu znajduje sie <marker name='sp'>punkt przeladunkowy paliw</marker>. Przeprowadzcie atak na niego i wysadzcie wszystko, co znajdziecie"], ["tskobj4","Zaklocic prace portu","W Czarnogorsku znajduje sie <marker name='po'>Wojskowa Skladnica Tranzytowa</marker>, przez ktora przybywa na Czarnorus wyposazenie amerykanskie. Nie dacie rady wysadzic ciezkiego sprzetu portowego, wiec zabijcie jego obsluge i zaminujcie sam sprzet. Rozminowanie terenu i sciagniecie wykfalikowanej kadry zajmie wystarczajaco duzo czasu, aby port nie sprawial klopotu do czasu operacji 'Miecz Mahometa'",EAST], ["tskobj5","Odciac prad w Czarnogorsku","Niedaleko Czernogorska znajduje sie <marker name='pp'>podstacja napiecia</marker>. Czarnorusini wynajeli polskich planistow do stworzenia ich sieci przesylowej pradu, i jest to jedyna droga ktora jest on przekazywany do miasta. Jej zniszczenie jest nam bardzo na reke.",EAST], ["tskobj6","Szukac okazji do ataku","Siejcie chaos wsrod sil przeciwnika. Jesli w czasie dzialanie zauwazycie cos, co stanowi wartosciowy cel, nie wahajcie sie atakowac.",EAST], ["tskobj7","Uciec z Czernorusi","Gdy wypelnicie zadania, badz wasz dowodca uzna, ze ich wykonanie jest niemozliwe, powinniscie sie wycofac. Do wyboru macie trzy opcje:<br/><br/>1. Droga ladowa, przez <marker name='grozowoj'>przelecz Grozowoj </marker>na polnocy. Niebezpieczna ze wzgledu na bliskosc lotniska wojskowego i mozliwe patrole.<br/><br/>2. Poprzez <marker name='morze'>Morze Zielone</marker>. W tym celu bedziecie musieli zdobyc odpowiedni statek. Chyba, ze nasz slawny Takistanski kebab z biedronki dal wam tyle sil, ze przeplyniecie wplaw 300 kilometrow.<br/><br/>3. Droga powietrzna na zachod, spowrotem do Takistanu. Chyba najbezpieczniejsza opcja, bedziecie musieli urzadzic rajd na <marker name=lotnisko'>lotnisko cywilne</marker> i porwac jakas maszyne.",EAST] ],[ ["Dostepny wywiad","W rejonie, w ktorym bedziecie operowac, stacjonuja glownie sily CDF, Amerykanow jest niewielu. <br/>Czego mozecie sie spodziewac:<br/>- licznych patroli, wasz przylot zapewne zostal wykryty<br/>- bardzo prawdopodobne jest napotkanie lekkich pojazdow opancerzonych, gdyz w Czernogorsku stacjonuje kompania zmechanizowana.<br/>- nasz wywad nie stwierdzil obecnosci czolgow<br/>- na lotnisko w Zagorii przebazowana zostala niedawno jednostka helikopterow szturmowych<br/>- na terenie waszego dzialania stacjonuje takze jednostka sil szybkiego reagowania<br/>- mamy informacje o stworzeniu bazy ogniowej mozdzierzy, nie wiemy jednak, czy osiagnela ona gotowosc bojowa<br/>- cywile niewiernych nie sa waszymi sprzymierzencami, jesli was zauwaza, na pewno powiadomia o tym wlasne sily.",EAST], ["Uzbrojenie","Z racji, ze najpewiej bedziecie zmuszeni skakac na spadochronach z bardzo niewielkiej wysokosci, zabierzecie ze soba tylko najbardziej podstawowe wyposazenie. W ciezka bron, radiostacje, medykamenty i sprzet do walki nocnej dozbroicie sie na ladowisku - chwile przed waszym przylotem zrzucilismy zaopatrzenie, ludzie z bojowki powinni je zebrac i zabezpieczyc do waszego ladawania.",EAST], ["Sytuacja ogolna","Dziwka Ameryka wraz ze swoim psem lancuchowym, Czarnorusia, chca napasc na nasz pokojowy raj, Takistan! Ale nasz ukochany przywodca, plk. Aziz, bedzie bronil pokoju do ostatniego naboju i pokrzyzuje plany zamorskich diablow.<br/><br/>Dlatego tez wysylamy was, swietnie wyszkolona grupe komandosow z oddzialow tzw. Czarnych Turbanow. Bedziecie jedna z dwudziestu grup, ktore zrzucamy na terenie Czarnorusi, gdzie Amerykanie przygotowuja sie do inwazji. <br/><br/>Waszym terenem bedzie wybrzeze, tereny Poludniowej Zagorii. Grupa bojownikow z lokalnej bojowki muzulmanskiej przygotowala dla was ladowisko - skok z 80 metrow na spadochronie lub ladowanie samolotem na nieoswietlonej polanie w lesie, wasz wybor.<br/><br/>Gdy dolaczycie do naszych sprzymierzencow, razem zadacie cios plugawemu sojuszowi Czarnorusinow i Amerykanow. Potem, gdy caly ich kraj ogarnie chaos i dezinformacja, ruszy operacja 'Miecz Mahometa' - inwazja ladowa poprzedzona uderzeniem broni chemicznej na najwieksze miasta.<br/><br/>W imie Allaha i pokoju!",EAST] ]] call compile preprocessFileLineNumbers "shk_taskmaster.sqf"; Edited October 24, 2011 by W0lle Changed tags Share this post Link to post Share on other sites
twirly 11 Posted October 24, 2011 (edited) Hi mate. Welcome to the forum. In your spoiler... it's just a wall of text that no one will be able to read! When you post code think about the person that has to read and make sense of it. So...you should hit the "ADVANCED" button and use "CODE" or "PHP" tags when posting code... and also do your best to make sure people can read it as easily as possible. If it's going to take an hour just to reformat and then read it... you will be very lucky indeed if any help comes your way. EDIT: Actually... I'm not sure code tags will help in this situation... Lol and Wow! Edited October 24, 2011 by twirly Added stuff Share this post Link to post Share on other sites
galzohar 31 Posted October 25, 2011 It's not just about other people being able to read it as easily as possible, it's also about you! You'll have a much easier time finding mistakes in your code if you write it in a way you can easily read it yourself. Example: [ [ [ "tskobj0" ,"Sparalizowac lacznosc dalekiego zasiegu" ,"Na szczycie gory niedaleko Zielenogorska znajduje sie <marker name='marker3'>stacja lacznosci</marker>. Jest zbyt solidna, abyscie zdolali ja wysadzic, tak wiec wybijcie jej obsluge i zaminujcie teren. To wylaczy ja z dzilania do czasu inwazji." ,"assigned" ] ,[ "tskobj1" ,"Wysadzic radary wczesnego ostrzegania" ,"Na terenie waszego dzialania znajduja sie dwa radary wczesnego ostrzegania:<br/><br/>- <marker name='sr'>Stacja 'Blysk'</marker><br/>- <marker name='st2'>Stacja 'Mrok'</marker>" ,EAST ] ,[ "tskobj2" ,"Zabic generala" ,"Wyeliminujcie generala Iwana Buchte. Czesto podrozuje on pomiedzy portem wojskowym a baza grupy szybkiego reagowania CDF. Buchta jest milosnikiem starych samochodow, najczesciej przemieszcza sie w starej, zabytkowej Woldze o czarnym nadwoziu.<br/><br/>Ten general jest glowym lacznikiem i koordynatorem dzialan pomiedzy CDF a USMC. Jego eliminacja znaczaco zmniejszy efektywnosc wspoldzialania tych dwoch sil" ,EAST ] ,[ "tskobj3" ,"Unieszkodliwic punkt paliwowy" ,"Na wybrzezu znajduje sie <marker name='sp'>punkt przeladunkowy paliw</marker>. Przeprowadzcie atak na niego i wysadzcie wszystko, co znajdziecie" // intentionally no 4th param here? ] ,[ "tskobj4" ,"Zaklocic prace portu" ,"W Czarnogorsku znajduje sie <marker name='po'>Wojskowa Skladnica Tranzytowa</marker>, przez ktora przybywa na Czarnorus wyposazenie amerykanskie. Nie dacie rady wysadzic ciezkiego sprzetu portowego, wiec zabijcie jego obsluge i zaminujcie sam sprzet. Rozminowanie terenu i sciagniecie wykfalikowanej kadry zajmie wystarczajaco duzo czasu, aby port nie sprawial klopotu do czasu operacji 'Miecz Mahometa'" ,EAST ] ,[ "tskobj5" ,"Odciac prad w Czarnogorsku" ,"Niedaleko Czernogorska znajduje sie <marker name='pp'>podstacja napiecia</marker>. Czarnorusini wynajeli polskich planistow do stworzenia ich sieci przesylowej pradu, i jest to jedyna droga ktora jest on przekazywany do miasta. Jej zniszczenie jest nam bardzo na reke." ,EAST ] ,[ "tskobj6" ,"Szukac okazji do ataku" ,"Siejcie chaos wsrod sil przeciwnika. Jesli w czasie dzialanie zauwazycie cos, co stanowi wartosciowy cel, nie wahajcie sie atakowac." ,EAST ] ,[ "tskobj7" ,"Uciec z Czernorusi" ,"Gdy wypelnicie zadania, badz wasz dowodca uzna, ze ich wykonanie jest niemozliwe, powinniscie sie wycofac. Do wyboru macie trzy opcje:<br/><br/>1. Droga ladowa, przez <marker name='grozowoj'>przelecz Grozowoj </marker>na polnocy. Niebezpieczna ze wzgledu na bliskosc lotniska wojskowego i mozliwe patrole.<br/><br/>2. Poprzez <marker name='morze'>Morze Zielone</marker>. W tym celu bedziecie musieli zdobyc odpowiedni statek. Chyba, ze nasz slawny Takistanski kebab z biedronki dal wam tyle sil, ze przeplyniecie wplaw 300 kilometrow.<br/><br/>3. Droga powietrzna na zachod, spowrotem do Takistanu. Chyba najbezpieczniejsza opcja, bedziecie musieli urzadzic rajd na <marker name=lotnisko'>lotnisko cywilne</marker> i porwac jakas maszyne." ,EAST ] ] ,[ [ "Dostepny wywiad" ,"W rejonie, w ktorym bedziecie operowac, stacjonuja glownie sily CDF, Amerykanow jest niewielu. <br/>Czego mozecie sie spodziewac:<br/>- licznych patroli, wasz przylot zapewne zostal wykryty<br/>- bardzo prawdopodobne jest napotkanie lekkich pojazdow opancerzonych, gdyz w Czernogorsku stacjonuje kompania zmechanizowana.<br/>- nasz wywad nie stwierdzil obecnosci czolgow<br/>- na lotnisko w Zagorii przebazowana zostala niedawno jednostka helikopterow szturmowych<br/>- na terenie waszego dzialania stacjonuje takze jednostka sil szybkiego reagowania<br/>- mamy informacje o stworzeniu bazy ogniowej mozdzierzy, nie wiemy jednak, czy osiagnela ona gotowosc bojowa<br/>- cywile niewiernych nie sa waszymi sprzymierzencami, jesli was zauwaza, na pewno powiadomia o tym wlasne sily." ,EAST ] ,[ "Uzbrojenie" ,"Z racji, ze najpewiej bedziecie zmuszeni skakac na spadochronach z bardzo niewielkiej wysokosci, zabierzecie ze soba tylko najbardziej podstawowe wyposazenie. W ciezka bron, radiostacje, medykamenty i sprzet do walki nocnej dozbroicie sie na ladowisku - chwile przed waszym przylotem zrzucilismy zaopatrzenie, ludzie z bojowki powinni je zebrac i zabezpieczyc do waszego ladawania." ,EAST ] ,[ "Sytuacja ogolna" ,"Dziwka Ameryka wraz ze swoim psem lancuchowym, Czarnorusia, chca napasc na nasz pokojowy raj, Takistan! Ale nasz ukochany przywodca, plk. Aziz, bedzie bronil pokoju do ostatniego naboju i pokrzyzuje plany zamorskich diablow.<br/><br/>Dlatego tez wysylamy was, swietnie wyszkolona grupe komandosow z oddzialow tzw. Czarnych Turbanow. Bedziecie jedna z dwudziestu grup, ktore zrzucamy na terenie Czarnorusi, gdzie Amerykanie przygotowuja sie do inwazji. <br/><br/>Waszym terenem bedzie wybrzeze, tereny Poludniowej Zagorii. Grupa bojownikow z lokalnej bojowki muzulmanskiej przygotowala dla was ladowisko - skok z 80 metrow na spadochronie lub ladowanie samolotem na nieoswietlonej polanie w lesie, wasz wybor.<br/><br/>Gdy dolaczycie do naszych sprzymierzencow, razem zadacie cios plugawemu sojuszowi Czarnorusinow i Amerykanow. Potem, gdy caly ich kraj ogarnie chaos i dezinformacja, ruszy operacja 'Miecz Mahometa' - inwazja ladowa poprzedzona uderzeniem broni chemicznej na najwieksze miasta.<br/><br/>W imie Allaha i pokoju!" ,EAST ] ] ] call compile preprocessFileLineNumbers "shk_taskmaster.sqf"; Share this post Link to post Share on other sites
Mustang_185 120 Posted October 26, 2011 It's not that I didn't format it becouse I'm lazy - I'm just so inexperienced, that I'm afraid to touch it in any way becouse I might ruin its syntax. I just copy-pasted my descriptions into taskmaster template. // intentionally no 4th param here? Nope, I forgot to put it in. But it should've work without it? It's strange that if I copy it to other mission, it works. Maybe something within mission itself blocks it from kicking in before mission start? I'm also using UPSMON and ACE mods - maybe they've something to do with this? Share this post Link to post Share on other sites
wiggum2 31 Posted November 7, 2011 Hi,I am using v0.33 and having trouble getting newly assigned tasks to be the current task as per the setCurrentTask command. In a radio trigger I have: ["Task1","succeeded","Task2"] call SHK_Taskmaster_upd; This correctly updates the status of Task1 and makes Task2 assigned but not current. I want Task2 to be the CurrentTask so that the yellow waypoint indicator will show up in the game. Adding player setCurrentTask Task2; in addition to the code in the radio trigger doesn't help. The 2 tasks in the mission are added correctly and have valid destination points. I have Task1 set as assigned at the beginning of the mission with a corresponding destination point that appears on mission start up. When I activate the radio trigger and then open the Tasks menu and manually click on "Set as current task" under Task2 then the yellow waypoint indicator appears in the correct destination point for Task2 and the task is made current. I am using CO with OA version 1.59.79384 with no mods loaded or any other scripts that would affect tasks. This test was done in the editor and in a locally hosted game. Am I doing something wrong? Are assigned tasks meant to be the CurrentTask? I have the same problem, tasks get assigned but are never current (like with the setCurrentTask command). Any idea ? Share this post Link to post Share on other sites
wiggum2 31 Posted November 18, 2011 Shuko told me he currently does no scripting and cant spot the error after a quick search. So can anyone fix the setCurrentTask error is this otherwise great script ? Share this post Link to post Share on other sites
loyalguard 15 Posted November 18, 2011 (edited) I am not intimately familiar with Shuko's great script, however I did take a quick look through it to see if anything seemed wrong. As far as I can tell there is only one instance of setCurrentTask in the entire script located in the function that adds new tasks (SHK_Taskmaster_addTask). SHK_Taskmaster_addTask does not appear to be called or spawned through the chain initiated by calling SHK_Taskmaster_upd with the optional 3rd parameter as a string -- it is only called or spawned when the third parameter is an array (which adds a new tasks after updating. There are a lot of function calls in this script, so, it is possible I missed it somewhere, but without setCurrentTask somewhere in the chain, the task will not be made current. I hope this helps. Edited November 18, 2011 by Loyalguard Typos Share this post Link to post Share on other sites
wiggum2 31 Posted November 18, 2011 I already added the setCurrentTask command at multiple location inside the script but with no positiv result... :( Share this post Link to post Share on other sites
loyalguard 15 Posted November 18, 2011 This is untested, but if you have not done so already, try this: 1. Find the SHK_Taskmaster_updateTask function in the .sqf file. 2. Look for the following line in that function: _handle settaskstate _state; 3. Paste the code below directly beneath the line above: if (_state in ["created","assigned"]) then { _x setCurrentTask _handle; }; The code above is exactly the same as Shuko used when adding new tasks. There is even a blank line in the function between where the state is set and where the function continues (this is where I recommend pasting the code above) so I wonder if it was in there but was removed. In fact if you look at the change log, there was a conflict between v.29 and v.31 with JIP and setting the current task so it could be that my fix breaks JIP current tasks. Try it and see if that works. If you already have and it does not work then I am afraid I don't see an easy fix. Share this post Link to post Share on other sites
wiggum2 31 Posted November 22, 2011 I just tried it but it also does not work... :( Share this post Link to post Share on other sites
hogmason 2 Posted April 12, 2012 SHK excellent script mate. 1 question im using your random mission picker example from another thread your example call compile preprocessfile "shk_taskmaster.sqf"; //taskCount = paramsarray select 0; taskCount = 6; SHK_addTask = { if isserver then { if (count SHK_Tasks == 0) then { // whatever you want server to do when mission should end TheEnd = true; publicvariable "TheEnd"; } else { [] spawn { if (count SHK_Tasks != taskCount) then {sleep 1}; private "_t"; _t = SHK_Tasks select (floor random count SHK_Tasks); SHK_Tasks = SHK_Tasks - [_t]; switch _t do { case 0: { ["Task1","Task1Title","Task1Desc",true,["mrkTaskMM1",getmarkerpos "task1","","","text1"]] call SHK_Taskmaster_add }; case 1: { ["Task2","Task2Title","Task2Desc",true,["mrkTaskMM1",getmarkerpos "task2","","","text1"]] call SHK_Taskmaster_add }; case 2: { ["Task3","Task3Title","Task3Desc",true,["mrkTaskMM1",getmarkerpos "task3","","","text1"]] call SHK_Taskmaster_add }; case 3: { ["Task4","Task4Title","Task4Desc",true,["mrkTaskMM1",getmarkerpos "task4","","","text1"]] call SHK_Taskmaster_add }; case 4: { ["Task5","Task5Title","Task5Desc",true,["mrkTaskMM1",getmarkerpos "task5","","","text1"]] call SHK_Taskmaster_add }; case 5: { ["Task6","Task6Title","Task6Desc",true,["mrkTaskMM1",getmarkerpos "task6","","","text1"]] call SHK_Taskmaster_add }; }; }; }; }; }; if isserver then { SHK_Tasks = []; for "_i" from 0 to (taskCount - 1) do { SHK_Tasks set [_i,_i]; }; call SHK_addTask; // first task }; waituntil {BIS_fnc_init}; my question is how can i put a sleep command in this so there is like a 3 minute gap before the next task is selected. also how can i have text appear on the bottom left hand side off my ingame screen informing me that a mission is ready. text example mission_text = "There is a radar tower on the top of mount Gur Dur. Find it and destroy it."; publicVariable "mission_text"; mission_resolved_text = "Good job. The radar tower on top of mount Gur Dur is down."; publicVariable "mission_resolved_text"; Share this post Link to post Share on other sites
hogmason 2 Posted April 14, 2012 got it with help from psvialli call compile preprocessfile "shk_taskmaster.sqf"; //taskCount = paramsarray select 0; taskCount = 6; SHK_addTask = { if isserver then { if (count SHK_Tasks == 0) then { // whatever you want server to do when mission should end TheEnd = true; publicvariable "TheEnd"; } else { [] spawn { if (count SHK_Tasks != taskCount) then {sleep 1}; private "_t"; _t = SHK_Tasks select (floor random count SHK_Tasks); SHK_Tasks = SHK_Tasks - [_t]; switch _t do { case 0: { ["Task1","Task1Title","Task1Desc",true,["mrkTaskMM1",getmarkerpos "task1","","","text1"]] call SHK_Taskmaster_add }; player sideChat "ADD MISSION START TEXT HERE." }; }; }; }; }; if isserver then { to show mission finish text add player sideChat "aDD MISSION FINNISH START TEXT HERE." the end function i.e "Task5","succeeded"] call SHK_Taskmaster_upd; [] call SHK_addTask; player sideChat "aDD MISSION FINNISH START TEXT HERE." Share this post Link to post Share on other sites
carlostex 38 Posted April 24, 2012 One thing would be neat. It would be nice if when you "set as current task" in the menu during the missions it would show a taskHint for the new assigned task. And when players JIP it would show the taskHint for the current assigned task. Share this post Link to post Share on other sites
hogmason 2 Posted May 16, 2012 How do i add different tasks per side i.e i have a tvt mission where west have to destroy a scud and east have to help the ai defend the scud. i call it by case 19: { ["Task20","Artillery Radar","SOCOMD have assigned us to destroy a Rusian Artillery radar located on Skalisty Island, If we can destroy this target we will limit the enemy's ability to call effective artillery strikes against UN forces.",true,["MissionAO",getmarkerpos "task20","flag","ColorRed"]] call SHK_Taskmaster_add; nul = [] execVM "missions\task20.sqf"; player sideChat "SOCOMD have assigned us to destroy a Rusian Artillery radar located Skalisty Island, If we can destroy this target we will limit the enemy's ability to call effective artillery strikes against UN forces" }; now that gives the task to all teams but i whish for it to give a different description to eachteam == west to destroy the scud == east to defend. Share this post Link to post Share on other sites
cuel 25 Posted May 16, 2012 ["Task20","Artillery Radar","SOCOMD have assigned us to destroy a Rusian Artillery radar located on Skalisty Island, If we can destroy this target we will limit the enemy's ability to call effective artillery strikes against UN forces.",[b]true[/b],["MissionAO",getmarkerpos "task20","flag","ColorRed"]] call SHK_Taskmaster_add; Change true to WEST or EAST and then make another one for the other team. Share this post Link to post Share on other sites
hogmason 2 Posted May 19, 2012 awsome cheers mate. 1 more thing is there a way i can execute the task's in a differnet init.sqf as my init is getting pretty danm long, see i am going to have over 100 tasks and it would be neater in its own init file this is what i need to move in my init to start the tasks ///////////////////////////////Set Up RANDOM tasks//////////////////////////// call compile preprocessfile "shk_taskmaster.sqf"; sleep .5; SHK_addTask = { if isserver then { if (count SHK_Tasks == 0) then { TheEnd = true; publicvariable "TheEnd"; } else { _this spawn { private "_t"; if (count _this > 0) then { _t = _this select 0; } else { _t = SHK_Tasks select (floor random count SHK_Tasks); }; SHK_Tasks = SHK_Tasks - [_t]; switch _t do { // case 0: { // ["Task1","Enemy Computer Evidence","SOCOMD has intell on the location of a Army Officer's Computer SOCOMD believe this Computer will contain vital information on The Rusian Armies war plans. Our job is to recover this Computer.",true,["MissionAO",getmarkerpos "task1","flag","ColorRed"]] call SHK_Taskmaster_add; // nul = [] execVM "missions\task1.sqf"; // player sideChat "SOCOMD has intell on the location of a Rusian Army Officer's Computer SOCOMD believe this Computer will contain vital information on The Rusian Armies war plans. Our job is to recover this Computer" // // }; case 1: { ["Task2","Kill WarLord","SOCOMD has reports of a terrorist warlord leader visiting the village Kabanino our job is to locate this warlord and kill him.",true,["MissionAO",getmarkerpos "task2","flag","ColorRed"]] call SHK_Taskmaster_add; nul = [] execVM "missions\task2.sqf"; player sideChat "SOCOMD has reports of a terrorist warlord leader visiting the village Kabanino our job is to locate this warlord and kill him" }; case 2: { ["Task3","Pilot Mayday","SOCOMD has just recieved a mayday from an A-10 Pilot who was shot down while on a CAS over Pulkovo SOCOMD located him by SAT View and watched him be captured and taken to Pulkovo simple orders boys find him and return him to HQ.",true,["MissionAO",getmarkerpos "task3","flag","ColorRed"]] call SHK_Taskmaster_add; nul = [] execVM "missions\task3.sqf"; player sideChat "SOCOMD has just recieved a mayday from an A-10 Pilot who was shot down while on a CAS over Pulkovo SOCOMD located him by SAT View and watched him be captured and taken to Pulkovo simple orders boys find him and return him to HQ" }; // case 3: { // ["Task4","Convoy Attacked","Our resuply convoy was just ambushed while passing through the Falar Pass, The convoys Officer has made a distress signal confirming he is the only surviver and only 1 supply truck is still in tact, so our job is to recover the truck to base and rescue the Officer to the HQ.",true,["MissionAO",getmarkerpos "task4","flag","ColorRed"]] call SHK_Taskmaster_add; // nul = [] execVM "missions\task4.sqf"; // player sideChat "Our resuply convoy was just ambushed while passing through the Falar Pass, The convoys Officer has made a distress signal confirming he is the only surviver and only 1 supply truck is still in tact, so our job is to recover the truck to base and rescue the Officer to the HQ" // // }; case 4: { ["Task5","Scud Attack","SOCOMD have found an enemy scud hiding in The old Rog Castle, we are to destroy the scud before the enemy luanch it.",true,["MissionAO",getmarkerpos "task5","flag","ColorRed"]] call SHK_Taskmaster_add; nul = [] execVM "missions\task5.sqf"; player sideChat "SOCOMD have found an enemy scud hiding in The old Rog Castle, we are to destroy the scud before the enemy luanch it" }; case 5: { ["Task6","Insurgent Financer","SOCOMD have intell that a insurgent financer is living in Elektrozavodsk find him kill him and deny the insurgents thier funds for ied's.",true,["MissionAO",getmarkerpos "task6","flag","ColorRed"]] call SHK_Taskmaster_add; nul = [] execVM "missions\task6.sqf"; player sideChat "SOCOMD have intell that a insurgent Financer is living in Elektrozavodsk find him kill him and deny the insurgents thier funds for ied's" }; case 6: { ["Task7","Kill WarLord","SOCOMD have located an Insurgent WarLrod in Rogovo he will be hiding in a building find him kill him.",true,["MissionAO",getmarkerpos "task7","flag","ColorRed"]] call SHK_Taskmaster_add; nul = [] execVM "missions\task7.sqf"; player sideChat "SOCOMD have located an Insurgent WarLrod in Rogovo he will be hiding in a building find him kill him" }; // case 7: { // ["Task8","Recover Suitcase","A us Recon Sniper claims to have shot a Taki Officer South of Rasman, the officer droped a Suitcase and a local picked it up and hiden it in his backyard, search all yards and find the Suitcase.",true,["MissionAO",getmarkerpos "task8","flag","ColorRed"]] call SHK_Taskmaster_add; // nul = [] execVM "missions\task8.sqf"; // player sideChat "A us Recon Sniper claims to have shot a Taki Officer South of Rasman, the officer droped a Suitcase and a local picked it up and hiden it in his backyard, search all yards and find the Suitcase" // // }; // case 8: { // ["Task9","Escort Press","General Harris has given permission for a reporter to spend a week with us, So we need to escort him and his SUV back to the HQ, He will be waiting inside a building at Timurkalay.",true,["MissionAO",getmarkerpos "task9","flag","ColorRed"]] call SHK_Taskmaster_add; // nul = [] execVM "missions\task9.sqf"; // player sideChat "General Harris has given permission for a reporter to spend a week with us, So we need to escort him and his SUV back to the HQ, He will be waiting inside a building at Timurkalay" // // }; case 9: { ["Task10","Artillery Radar","SOCOMD have assigned us to destroy a Rusian Artillery radar located at Zelenogorsk, If we can destroy this target we will limit the enemy's ability to call effective artillery strikes against UN forces.",true,["MissionAO",getmarkerpos "task10","flag","ColorRed"]] call SHK_Taskmaster_add; nul = [] execVM "missions\task10.sqf"; player sideChat "SOCOMD have assigned us to destroy a Rusian Artillery radar located at Zelenogorsk, If we can destroy this target we will limit the enemy's ability to call effective artillery strikes against UN forces" }; case 10: { ["Task11","Air Radar","SOCOMD have assigned us to destroy a Rusian Air radar located at Myshikino, If we can destroy this target we will limit the enemy's ability to call effective air strikes against UN forces.",true,["MissionAO",getmarkerpos "task11","flag","ColorRed"]] call SHK_Taskmaster_add; nul = [] execVM "missions\task11.sqf"; player sideChat "SOCOMD have assigned us to destroy a Rusian Air radar located at Myshikino, If we can destroy this target we will limit the enemy's ability to call effective air strikes against UN forces" }; case 11: { ["Task12","Artillery Radar","SOCOMD have assigned us to destroy a Rusian Artillery radar located at the Devils Castle, If we can destroy this target we will limit the enemy's ability to call effective artillery strikes against UN forces.",true,["MissionAO",getmarkerpos "task12","flag","ColorRed"]] call SHK_Taskmaster_add; nul = [] execVM "missions\task12.sqf"; player sideChat "SOCOMD have assigned us to destroy a Rusian Artillery radar located at the Devils Castle, If we can destroy this target we will limit the enemy's ability to call effective artillery strikes against UN forces" }; case 12: { ["Task13","Air Radar","SOCOMD have assigned us to destroy a Rusian Air radar located at Pulkovo, If we can destroy this target we will limit the enemy's ability to call effective air strikes against UN forces.",true,["MissionAO",getmarkerpos "task13","flag","ColorRed"]] call SHK_Taskmaster_add; nul = [] execVM "missions\task13.sqf"; player sideChat "SOCOMD have assigned us to destroy a Rusian Air radar located at Pulkovo, If we can destroy this target we will limit the enemy's ability to call effective air strikes against UN forces" }; case 13: { ["Task14","Artillery Radar","SOCOMD have assigned us to destroy a Rusian Artillery radar located at Staroye, If we can destroy this target we will limit the enemy's ability to call effective artillery strikes against UN forces.",true,["MissionAO",getmarkerpos "task14","flag","ColorRed"]] call SHK_Taskmaster_add; nul = [] execVM "missions\task14.sqf"; player sideChat "SOCOMD have assigned us to destroy a Rusian Artillery radar located at Staroye, If we can destroy this target we will limit the enemy's ability to call effective artillery strikes against UN forces" }; case 14: { ["Task15","Scud Attack","SOCOMD have found an broken enemy scud hiding on Mt Klen, we are to destroy the scud before the enemy repair it.",true,["MissionAO",getmarkerpos "task15","flag","ColorRed"]] call SHK_Taskmaster_add; nul = [] execVM "missions\task15.sqf"; player sideChat "SOCOMD have found an broken enemy scud hiding on Mt Klen, we are to destroy the scud before the enemy repair it" }; case 15: { ["Task16","Scud Attack","SOCOMD have found an broken enemy scud hiding at Solnichy, we are to destroy the scud before the enemy repair it.",true,["MissionAO",getmarkerpos "task16","flag","ColorRed"]] call SHK_Taskmaster_add; nul = [] execVM "missions\task16.sqf"; player sideChat "SOCOMD have found an broken enemy scud hiding at Solnichy, we are to destroy the scud before the enemy repair it" }; case 16: { ["Task17","Scud Attack","SOCOMD have found an broken enemy scud hiding at Pobeda Dam, we are to destroy the scud before the enemy repair it.",true,["MissionAO",getmarkerpos "task17","flag","ColorRed"]] call SHK_Taskmaster_add; nul = [] execVM "missions\task17.sqf"; player sideChat "SOCOMD have found an broken enemy scud hiding at Pobeda Dam, we are to destroy the scud before the enemy repair it" }; case 17: { ["Task18","Scud Attack","SOCOMD have found an broken enemy scud hiding at Gorka, we are to destroy the scud before the enemy repair it.",true,["MissionAO",getmarkerpos "task18","flag","ColorRed"]] call SHK_Taskmaster_add; nul = [] execVM "missions\task18.sqf"; player sideChat "SOCOMD have found an broken enemy scud hiding at Gorka, we are to destroy the scud before the enemy repair it" }; case 18: { ["Task19","Scud Attack","SOCOMD have found an broken enemy scud hiding at Black Lake, we are to destroy the scud before the enemy repair it.",true,["MissionAO",getmarkerpos "task19","flag","ColorRed"]] call SHK_Taskmaster_add; nul = [] execVM "missions\task19.sqf"; player sideChat "SOCOMD have found an broken enemy scud hiding at Black Lake, we are to destroy the scud before the enemy repair it" }; case 19: { ["Task20","Artillery Radar","SOCOMD have assigned us to destroy a Rusian Artillery radar located on Skalisty Island, If we can destroy this target we will limit the enemy's ability to call effective artillery strikes against UN forces.",true,["MissionAO",getmarkerpos "task20","flag","ColorRed"]] call SHK_Taskmaster_add; nul = [] execVM "missions\task20.sqf"; player sideChat "SOCOMD have assigned us to destroy a Rusian Artillery radar located Skalisty Island, If we can destroy this target we will limit the enemy's ability to call effective artillery strikes against UN forces" }; }; }; }; }; }; private "_selectedTask"; taskCount = 15; //or use description i.e paramsarray select 4; _selectedTask = 99; // or use description i.e paramsarray select 5; if isserver then { private ["_tmp","_t"]; _tmp = [1,2,4,5,6,9,10,11,12,13,14,15,16,17,18,19,20]; SHK_Tasks = []; for "_i" from 0 to (taskCount - 1) do { _t = _tmp select (floor random count _tmp); SHK_Tasks set [_i,_t]; _tmp = _tmp - [_t]; }; // first task if (_selectedTask < 99) then { [_selectedTask] call SHK_addTask; } else { [] call SHK_addTask; }; }; i tried missions_init.sqf calling by placing this in my init.sqf #include "missions_init.sqf" but it did not work Share this post Link to post Share on other sites
twirly 11 Posted May 19, 2012 (edited) Put all that Taskmaster code or any code for that matter in a file.... say "script.sqf" and then just execute it from your init.sqf with.... init.sqf:- nul = [] execVM "script.sqf"; EDIT: This may or may not apply to that specific code.... but if you need to wait until an executed script finishes before you carry on with more code... use something like this instead... init.sqf:- _scr = [] execVM "script.sqf"; waituntil {scriptdone _scr}; //...blah blah blah //execute other stuff now Edited May 19, 2012 by twirly Share this post Link to post Share on other sites
hogmason 2 Posted May 21, 2012 awsome thanks mate again your a legend ill try this tonight ;) Share this post Link to post Share on other sites
1para{god-father} 105 Posted May 26, 2012 Is there a way to delete Tasks once complete ? Share this post Link to post Share on other sites
Jigsor 176 Posted September 12, 2012 I've gotten Taskmaster working and love it so far. Thank you Shuko. Is there a way to get AI group to sit still at waypoint untill a task is assigned? I've tried using this call function in the condition box of both waypoint and in trigger. The AI group is not responding to the call in any combination. Condition: ["Task3_beachhead","assigned"] call SHK_Taskmaster_hasState Any ideas on how to use impliment the call functions? Share this post Link to post Share on other sites