Jump to content
Sign in to follow this  
seedo81

Why my briefing code not working?

Recommended Posts

hello:

this is my mission task briefing code i dont know why its not working

//objective 1

tskobj_1 = player createSimpleTask["Clear Area1"];

tskobj_1 setSimpleTaskDescription ["Clear the Area from the Enemy", "Clear Area1", "Clear Area1"];

tskobj_1 setSimpleTaskDestination (getMarkerPos "Clear Area1");

player setCurrentTask tskobj_1;

when i finish the mission the task indicator doesn't turn green as its completed y?

thank you

Share this post


Link to post
Share on other sites

i don't mean to be rude but is my question this hard? or u don't understand what i mean?

i will really appreciate any help

thank you

Share this post


Link to post
Share on other sites

you, not u!

why, not y!

The two additional characters surely don't kill you.

As for your question. The task indicator isn't changed to green automatically when you end the mission (how the engine should know that you have accomplished the objective?).

You have to tell the engine that a certain task has been succeeded by using the setTaskState command.

This has been asked several times in the past here, I guess you haven't received an answer because it's too obvious you haven't searched but thought others will do the brainstorming for you which doesn't work too well here. ;)

Edited by W0lle

Share this post


Link to post
Share on other sites

thank you

but i did tell the engine in a trigger

am really confused

and yes i do finish the task

Share this post


Link to post
Share on other sites

You should have said that in the first post already as we don't have magic crystal balls here. ;)

So when you have finished the task, the objective indicator in the briefing turns green right?

But if you end the mission it's not marked as done. The question now is what you exactly mean.

Do you mean the task is not marked as done in the debriefing?

Or do you mean the mission is not marked as done (green) in the mission selection screen?

Share this post


Link to post
Share on other sites
You should have said that in the first post already as we don't have magic crystal balls here. ;)

So when you have finished the task, the objective indicator in the briefing turns green right?

But if you end the mission it's not marked as done. The question now is what you exactly mean.

Do you mean the task is not marked as done in the debriefing?

Or do you mean the mission is not marked as done (green) in the mission selection screen?

it is this

Or do you mean the mission is not marked as done (green) in the mission selection screen?

when the mission is done it doesnt turn green check like it should in the task selection

Share this post


Link to post
Share on other sites

To make this happen you need two things:

1. In the description.ext add this line:

doneKeys[]={"MyMissionName"};

Where "MyMissionName" is a unique keyname for your mission, like the pbo filename.

2. In a trigger (or script) which ends your mission you add this:

activateKey "MyMissionName";

Share this post


Link to post
Share on other sites

My converted OFP missions all have this feature, you can grab and unpack them for analysis. :)

Alternatively you can upload your mission and I add the lines to it. After all it's not that hard (once you know how).

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  

×