Jump to content
Sign in to follow this  
derox

Tasks

Recommended Posts

Hello

I am making a mission with like 20 tasks. But at the first faze at the mission i want that only 1 Task shows up.

After you completed that task the other tasks will show up.

What i did.

Init

execVM "Briefing.sqf";

Briefing.sqf

tskobj_1 = player createSimpleTask["Capture The outpost East"];
tskobj_1 setSimpleTaskDescription ["Capture the <marker name='m1'>Outpost east</marker> So we can Use it as Forward Operating Base(FOB)", "Task1", "Capture The outpost East"];
tskobj_1 setSimpleTaskDestination (getMarkerPos "m1");

Trigger

"m1" setMarkerColor "ColorGreen";nul = this execVM "area1.sqf";"1" objStatus "DONE"; tskobj_1 setTaskState "SUCCEEDED"; player setCurrentTask tskobj_2; obj_1 = true; publicVariable "obj_1";taskhint ["Outpost East Captured", [0.600000,0.839215,0.466666,1], "taskDone"];nul = this execVM "tasks.sqf"

tasks.sqf

tskobj_2 = player createSimpleTask["Capture Communications Station"];
tskobj_2 setSimpleTaskDescription ["Capture the <marker name='m2'>Communications Station</marker> So they cant Comunicate with there homeland.", "Task2", "Capture Communications Station"];
tskobj_2 setSimpleTaskDestination (getMarkerPos "m2");

If i complete task1 then i want taks 2 too show up. But right now if i complete task1. Task2 will not show up. Does somone know how to fix this.

Greetz Derox.

Share this post


Link to post
Share on other sites

On the map, where do you want to have a tasks, create markers with the names for example tsk1- tsk4.

Next, you create a task with the parameters. So, as follows:

tsk1 = aP createSimpleTask ["Destroy fuel station"];
tsk1 setSimpleTaskDescription ["Destroy fuel station", "Destroy fuel station", "Primary task: Destroy fuel station"];
tsk1 setSimpleTaskDestination (getMarkerPos "tsk1");
aP setCurrentTask tsk1;
tsk1 setTaskState "Assigned";

And according to this script, you create other tasks (only tsk1 you must rename at tsk2, tsk3, tsk4).

If you using this script (preferably at the start, if you want to have visible only a task 1), so other tasks (tsk2, tsk3, tsk4) will be invisible after a period of time, until you show up:

aP removeSimpleTask tsk2;
aP removeSimpleTask tsk3;
aP removeSimpleTask tsk4;

It should work ...

Edited by [CSLA]LUKI

Share this post


Link to post
Share on other sites
On the map, where do you want to have a tasks, create markers with the names for example tsk1- tsk4.

Next, you create a task with the parameters. So, as follows:

tsk1 = aP createSimpleTask ["Destroy fuel station"];
tsk1 setSimpleTaskDescription ["Destroy fuel station", "Destroy fuel station", "Primary task: Destroy fuel station"];
tsk1 setSimpleTaskDestination (getMarkerPos "tsk1");
aP setCurrentTask tsk1;
tsk1 setTaskState "Assigned";

And according to this script, you create other tasks (only tsk1 you must rename at tsk2, tsk3, tsk4).

If you using this script (preferably at the start, if you want to have visible only a task 1), so other tasks (tsk2, tsk3, tsk4) will be invisible after a period of time, until you show up:

aP removeSimpleTask tsk2;
aP removeSimpleTask tsk3;
aP removeSimpleTask tsk4;

It should work ...

Okey Thx ill test it out soon :D

Share this post


Link to post
Share on other sites

If you using this script (preferably at the start, if you want to have visible only a task 1), so other tasks (tsk2, tsk3, tsk4) will be invisible after a period of time, until you show up:

aP removeSimpleTask tsk2;
aP removeSimpleTask tsk3;
aP removeSimpleTask tsk4;

It should work ...

Was also looking for this too, so thanks! the tasks work fine, show on the map fine, but I cant figure out where to put the above code so that task2, task3 etc are hidden until the previous task is completed

Share this post


Link to post
Share on other sites

You've got to use the waitUntil :)

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  

×