Ghost 40 Posted December 4, 2015 I create all my tasks via functions during the mission. The tasks work fine as long as I have execVM "shk_taskmaster.sqf"; in the init.sqf with the file in the mission directory. If I remove shk then the tasks do not work. Am I supposed to initialize the task system somehow? I have tried creating a generic task using the task module and still the scripted tasks do not work. Share this post Link to post Share on other sites
shuko 59 Posted December 4, 2015 The Taskmaster was made before BIS created it's own task framework and modules. You can either use the Taskmaster or use BIS functions. Share this post Link to post Share on other sites
Ghost 40 Posted December 4, 2015 I understand that. But The BIS task system will not work in my mission unless I run shk taskmaster. It is really odd. I do not use any commands from the taskmaster only the initialize in the init.sqf Share this post Link to post Share on other sites
thedubl 43 Posted December 4, 2015 I was having issues and this is what shuko mentioned to me. shuko said, "BIS_fnc_taskCreate is bugged at the moment (post-patch). It doesn't accept boolean as the first argument (units the task should be created for). It's known by BIS, and fix is already in a planned hotfix." Maybe that is the issue. dubl Share this post Link to post Share on other sites
Ghost 40 Posted December 4, 2015 I saw that post. But how can the tasks work if i run the taskmaster? I dont understand what the taskmaster is doing so the tasks operate normal. I am using the true variable and as long as I run taskmaster everything is fine in mp. Share this post Link to post Share on other sites
jeza 5416 Posted December 4, 2015 FHQ tasks https://forums.bistudio.com/topic/142763-fhq-tasktracker/ Use that. Share this post Link to post Share on other sites
thedubl 43 Posted December 5, 2015 I saw that post. But how can the tasks work if i run the taskmaster? I dont understand what the taskmaster is doing so the tasks operate normal. I am using the true variable and as long as I run taskmaster everything is fine in mp. I wish I knew. Seems to be broken more me too. dubl Share this post Link to post Share on other sites
thedubl 43 Posted December 5, 2015 I have tried the recommended from jeza. It does work. FHQ tasks https://forums.bistu...hq-tasktracker/ dubl Share this post Link to post Share on other sites
shuko 59 Posted December 5, 2015 Taskmaster works. BIS functions work as long as you get the latest hotfix (Dec 3rd). I'd figure out what funny business is going on in the mission instead of just trying yet another system. Taskmaster does not require BIS functions (basic commands yes, but not the functions). BIS functions/task framework does not require Taskmaster. There's nothing by design in Taskmaster that should affect BIS functions. Share this post Link to post Share on other sites
Ghost 40 Posted December 6, 2015 Taskmaster works. BIS functions work as long as you get the latest hotfix (Dec 3rd). I'd figure out what funny business is going on in the mission instead of just trying yet another system. Taskmaster does not require BIS functions (basic commands yes, but not the functions). BIS functions/task framework does not require Taskmaster. There's nothing by design in Taskmaster that should affect BIS functions. I do have the hotfix. I am not sure whats going on and I know the two systems do not rely on one another. Just cannot figure out why it does not work without it. Share this post Link to post Share on other sites
thedubl 43 Posted December 6, 2015 Taskmaster works. BIS functions work as long as you get the latest hotfix (Dec 3rd). I'd figure out what funny business is going on in the mission instead of just trying yet another system. Taskmaster does not require BIS functions (basic commands yes, but not the functions). BIS functions/task framework does not require Taskmaster. There's nothing by design in Taskmaster that should affect BIS functions. I can confirm the bis functions for tasks do not work reliably on a server even after the Dec 3rd hotfix. Unless there is some magic I am missing... it is still wonky. dubl Share this post Link to post Share on other sites
barbolani 198 Posted December 6, 2015 Hi, Here is the ticket regarding the issues with BIS_fncSetTask http://feedback.arma3.com/view.php?id=26729 The ticket is closed as "solved" but it seems not in 100% of the situations. If you are sure it's the case. Build some small "proof" of it (way to reproduce an error, or the error you see in the function itself) and post it there. I think it's the best way. Share this post Link to post Share on other sites
shuko 59 Posted December 6, 2015 I can confirm the bis functions for tasks do not work reliably on a server even after the Dec 3rd hotfix. Unless there is some magic I am missing... it is still wonky. dubl Well, if you can confirm it. Then create a fresh new mission to show it. That will make it easier to track down the bug. Share this post Link to post Share on other sites
thedubl 43 Posted December 6, 2015 No need to create a fresh new mission. My new work in progress is here. There are 5 tasks that should load. Some times they all load, sometimes they a few load, and sometimes none. Create the task, set state, condition met set state again. Connection info (no longer open... password changed while being finished.): 23.19.225.178:2366 pw= guerrilla610 Example: [west, "ElimA", ["Eliminate the AA. The AA have positioned themseleves on the west coast of the island. We cannot safely get Air Support off the ground. Find and Elimante AA to get Transport Support.", "Eliminate the AA", ""], [], true] spawn BIS_fnc_taskCreate;["ElimA", "CREATED",true] call BIS_fnc_taskSetState;waitUntil {sleep 2; (!alive _t1)&&(!alive _t2)&&(!alive _t3)&&(!alive _t4)};//success task["ElimA", "SUCCEEDED",true] spawn BIS_fnc_taskSetState; Share this post Link to post Share on other sites
barbolani 198 Posted December 7, 2015 Use BIS_fnc_setTask for both Create and SetState instead and you will have no problem. What's failing for me is BIS_fnc_deleteTask In the journal (you press J) they get removed but a ["task"] call BIS_fnc_taskExists returns true Share this post Link to post Share on other sites
Larrow 2816 Posted December 7, 2015 CALL BIS_fnc_taskCreate instead of spawning it, else the task vars dont exist when you taskSetState and likely messes up all the task vars. Use BIS_fnc_setTask for both Create and SetState instead and you will have no problem.Makes no real difference as thats all taskCreate does anyway. What's failing for me is BIS_fnc_deleteTaskLooks like someone forgot to clean up the new task vars properly in the delete function.Try this for the moment until it gets fixed.. fnc_deleteTask = { params [ "_task" ]; _taskVar = _task call BIS_fnc_taskVar; _owners = missionNamespace getVariable format[ "%1.3", _taskVar ]; _taskReal = _task call BIS_fnc_taskReal; _task call BIS_fnc_deleteTask; { if ( _x isEqualType true ) then { _owners set [ _forEachIndex, 0 ]; }; }forEach _owners; [ _taskVar, _taskReal ] remoteExec [ "fnc_deleteTaskData", _owners ]; }; fnc_deleteTaskData = { params[ "_taskVar", "_taskReal" ]; waitUntil { isNull _taskReal }; for "_index" from 0 to 11 do { missionNamespace setVariable [ format[ "%1.%2", _taskVar, _index ], nil ]; }; };Just call fnc_deleteTask passing the taskID instead of calling BIS_fnc_deleteTask. e.g _task = [west, "ElimA", ["Eliminate the AA. The AA have positioned themseleves on the west coast of the island. We cannot safely get Air Support off the ground. Find and Elimante AA to get Transport Support.", "Eliminate the AA", ""], [], true] call BIS_fnc_taskCreate; _task call fnc_deleteTaskOnly put it through a quick test on dedi, seems ok.Added a note to your ticket. Share this post Link to post Share on other sites
Ghost 40 Posted December 7, 2015 Everything works great now. I apparently was missing a line waituntil for a shk_taskmaster function thus halting BIS tasks from functioning along with other things. Thanks for your help. It never created an error and I forgot about the line. Share this post Link to post Share on other sites
thedubl 43 Posted December 7, 2015 CALL BIS_fnc_taskCreate instead of spawning it, else the task vars dont exist when you taskSetState and likely messes up all the task vars. Makes no real difference as thats all taskCreate does anyway. Looks like someone forgot to clean up the new task vars properly in the delete function. Try this for the moment until it gets fixed.. fnc_deleteTask = { params [ "_task" ]; _taskVar = _task call BIS_fnc_taskVar; _owners = missionNamespace getVariable format[ "%1.3", _taskVar ]; _taskReal = _task call BIS_fnc_taskReal; _task call BIS_fnc_deleteTask; { if ( _x isEqualType true ) then { _owners set [ _forEachIndex, 0 ]; }; }forEach _owners; [ _taskVar, _taskReal ] remoteExec [ "fnc_deleteTaskData", _owners ]; }; fnc_deleteTaskData = { params[ "_taskVar", "_taskReal" ]; waitUntil { isNull _taskReal }; for "_index" from 0 to 11 do { missionNamespace setVariable [ format[ "%1.%2", _taskVar, _index ], nil ]; }; };Just call fnc_deleteTask passing the taskID instead of calling BIS_fnc_deleteTask. e.g _task = [west, "ElimA", ["Eliminate the AA. The AA have positioned themseleves on the west coast of the island. We cannot safely get Air Support off the ground. Find and Elimante AA to get Transport Support.", "Eliminate the AA", ""], [], true] call BIS_fnc_taskCreate; _task call fnc_deleteTaskOnly put it through a quick test on dedi, seems ok.Added a note to your ticket. Thanks Larrow! Looks like using call instead of spawn worked. I will test more tonight! dubl Share this post Link to post Share on other sites