Jump to content
Sign in to follow this  
fasterthanlight

5 concurrent tasks

Recommended Posts

Here is what I have for my briefing;

Task1 = player createSimpleTask ["Neutralize suspected AA site 1"];

Task1 setSimpleTaskDestination (getMarkerPos "aatung1");

Task2 = player createSimpleTask ["Neutralize suspected AA site 2"];

Task2 setSimpleTaskDestination (getMarkerPos "aatung2");

Task3 = player createSimpleTask ["Neutralize suspected AA site 3"];

Task3 setSimpleTaskDestination (getMarkerPos "aatung3");

Task4 = player createSimpleTask ["Neutralize suspected AA site 4"];

Task4 setSimpleTaskDestination (getMarkerPos "aatung4");

Task5 = player createSimpleTask ["Neutralize suspected AA site 5"];

Task5 setSimpleTaskDestination (getMarkerPos "aatung5");

What is needed for each task to complete?

and

What is needed for a trigger to sense all are done, and end the game?

Share this post


Link to post
Share on other sites

I use this to fail a task in a trigger

"1" objstatus "FAILED"; tskobj_1 settaskstate "FAILED"; tskobj_1 = TRUE; publicVariable "obj_1";

and this to complete a task

"1" objstatus "DONE"; tskobj_1 settaskstate "SUCCEEDED"; tskobj_1 = true; publicVariable "obj_1";

Just change the numbers for the tasks you need for each task.

Have each task set to a trigger and name the trigger, like task1, task2 and task 3, then have another trigger set to end the mission with the Condition of

TriggerActivated task1 AND TriggerActivated task2 AND TriggerActivated task3, so the end trigger will only activated once all the other task triggers have been completed

Share this post


Link to post
Share on other sites

I'm not sure what has to be changed where.

in task trigger named Task1;

Activation of OPFOR NOT PRESENT

or

!alive tung1

On Activation field;

"1" objstatus "DONE"; tskobj_1 settaskstate "SUCCEEDED"; tskobj_1 = true; publicVariable "obj_1";

??

Share this post


Link to post
Share on other sites

To create a task use this

tskobj_1 = player createSimpleTask ["Whatever you want here"];

tskobj_1 setSimpleTaskDescription ["Whatever you want here.", "Task name", "Task name"];

tskobj_1 setSimpleTaskDestination (getMarkerPos "markername");

I'd set it to

Activation = Anybody - Present

Condition = !alive tung1

On Activation = "1" objstatus "DONE"; tskobj_1 settaskstate "SUCCEEDED"; tskobj_1 = true; publicVariable "obj_1";

Edited by Koni

Share this post


Link to post
Share on other sites

You shouldn't need to check that tung1 is dead in all your tasks, just have the task that needs tung1 dead to be signed off completed.

I'll have a look at that task order for Arma2 Kylania, just always used the old OFP code, which works well.

Share this post


Link to post
Share on other sites

Here's a proper ArmA2 tasks demo mission for destroying 5 Tunguskas.

I updated this mission to also include the Ambient Civilian Module and the "if you kill more than 2 civies the game ends" type trigger.

Edited by kylania

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  

×