eXpouk 10 Posted October 9, 2013 Hi guys, I was wondering if anyone has any info on how to use parent/child tasks properly? Also, in a trigger thats to be viewed by all connected players, what could I put in it to check that a task is completed before setting another task as assigned? Using the in-game notifications etc. Thanks Share this post Link to post Share on other sites
kylania 567 Posted October 9, 2013 Synch the Create Task Module for the second task to the completion trigger of the first task. Share this post Link to post Share on other sites
eXpouk 10 Posted October 9, 2013 I would do that but I'd like all the tasks created at the start of the mission so they can be read in the briefing. Share this post Link to post Share on other sites
kylania 567 Posted October 9, 2013 No sure how to do child tasks with modules, but with the functions it's: _null = [west, ["tskChildTask", "tskParentTask"], ["Destroy the heli", "Destroy Heli", "heli"], heli, true] spawn BIS_fnc_taskCreate; Share this post Link to post Share on other sites
eXpouk 10 Posted October 9, 2013 Yeah I'd prefer to do it all with functions :D Is there anyway to check in a trigger if a task is complete before setting another tasks state? IF "task1" is "completed" then set "task2" assigned type function? Thanks for your help Kylania. Share this post Link to post Share on other sites
IndeedPete 1038 Posted October 9, 2013 Condition: "task" call BIS_fnc_taskState == "SUCCEEDED" However, the task must be created at the beginning of the mission or this will result in errors. (At least in the version i tested it with a while back, there's probably a better solution.) On Act: ["anotherTask", "SUCCEEDED"] call BIS_fnc_taskSetState; Share this post Link to post Share on other sites
eXpouk 10 Posted October 9, 2013 I've found a solution! Thanks for your help :D Share this post Link to post Share on other sites
kylania 567 Posted October 10, 2013 If the solution isn't what Pete said, mind posting it for others with your same problem to learn from? Share this post Link to post Share on other sites
Larrow 2799 Posted October 10, 2013 IF "task1" is "completed" then set "task2" assigned type function? Something like... if ( ["Task1"] call BIS_fnc_taskExists && { ["Task1"] call BIS_fnc_taskCompleted } ) then { ["Task2", "assigned"] call BIS_fnc_taskSetState; }; Share this post Link to post Share on other sites