Jump to content
Sign in to follow this  
eXpouk

Task Help

Recommended Posts

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

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

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

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

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

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

I've found a solution! Thanks for your help :D

Share this post


Link to post
Share on other sites

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
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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×