I have tried many permutations to attempt to get any Task object passed like this. I understand that ARMA 3 allows the passing of any object as a parameter, including a Task object but I cannot use this method as the sqf fails to see _thetask as a Task object. The tasks are created in the briefing.sqf file as follows:
player createDiaryRecord ["Diary", ["Mission: Recover the Intel", "Your mission is to recover an important piece of intel from OPFOR hands. You must try remain undetected during the mission, it will make for you easier."]];
objTaskOne = player createSimpleTask ["Recover the Intel."];
objTaskOne setSimpleTaskDescription ["In Camp Rogain, the OPFOR have valuable intel we need, go recover it.", "Get the Intel", "Pickup the Intel"];
objTaskOne setSimpleTaskDestination (getMarkerPos "objTask1");
objTaskTwo = player createSimpleTask ["Kill the Bad Guy", objTaskOne];
objTaskTwo setSimpleTaskDescription ["Kill the Bad Guy", "Kill the Bad Guy", "Kill the Bad Guy"];
objTaskTwo setSimpleTaskDestination (getMarkerPos "objTask2");
player setCurrentTask objTaskOne;
player setCurrentTask objTaskTwo;