Jump to content
Sign in to follow this  
engima

Objectives/Tasks does not appear on debriefing screen

Recommended Posts

Dear ArmA2 editing friends!

I'm about to release my first mission, but I need assistance with the tasks. I've encountered the following really strange behaviour:

I have made a test mission with three playable units and one single task (Move to the barrel!), and I run it as Preview from the editor. The task is assigned to all three units like this:

unit1task1 = p1 createSimpleTask ["Move to barrel!"];
unit1task1 setSimpleTaskDescription ["Move to barrel!", "Move to barrel!", ""];

unit2task1 = p2 createSimpleTask ["Move to barrel!"];
unit2task1 setSimpleTaskDescription ["Move to barrel!", "Move to barrel!", ""];

unit3task1 = p3 createSimpleTask ["Move to barrel!"];
unit3task1 setSimpleTaskDescription ["Move to barrel!", "Move to barrel!", ""];

The mission has one end trigger, and when it triggers I am usually presented with the debriefing screen that contains a list of all tasks (objectives).

Now, if my character (who is the group leader) dies and I team switch to another unit in the group, then I will get the correct objectives list only if the group has not yet been assigned a new actual.

arma2oa2011-06-0718-33-42-87.jpg

However, if the group has been assigned a new actual (which happens automatically in a matter of seconds), then the debriefing screen will be just blank.

arma2oa2011-06-0718-31-33-70.jpg

How can that be, and what am I missing here?

Thankful for any help!

Share this post


Link to post
Share on other sites

Hasn't anyone had this problem? If you want to see it with your own eyes, please download my example mission:

Test mission pbo

Edited by Engima
correct link

Share this post


Link to post
Share on other sites

I think its more of a case, you didn't use the search..... there must be thousands of briefing threads here...

Share this post


Link to post
Share on other sites

Hi,

assigning the Tasks to all the units makes no sense. Tasks are for player only (not for units or AI).

So you can just make a loop which re-adds the tasks after you switched the character:

[] spawn {
while {true} do {

	_Task1 = player createSimpleTask ["Move to barrel!"];
	_Task1 setSimpleTaskDescription ["Move to barrel!", "Move to barrel!", ""];

	if (!isNil "Task1Accomplished") then {
		_Task1 setTaskState "Succeeded";
	};

	_OldPlayer = (vehicle player);

	waitUntil {_OldPlayer != (vehicle player) && (vehicle player) isKindOf "Man"};

};
};

Once the variable Task1Accomplished has been defined (Task1Accomplished = true) it will be flagged as succeeded.

Share this post


Link to post
Share on other sites

Thanks, but that solution doesn't work. Using your code adds a new task to the unit each time i perform a team switch into it. So I get duplicate tasks. And the main problem still remains. If I team switch, kill the leader, wait until a new leader is assigned and then end mission, I get a debriefing screen with an empty list of objectives.

Viper, I did use the search a lot. And there are thousands of briefing threads, but no one seem to have had this very problem. I find it a bit strange, because it would be a problem for every mission with playable units and possibility to team switch between them. Maybe I'm missing something very basic, but please someone, help! I really need to learn what is going on here...!

Share this post


Link to post
Share on other sites

This should solve the first problem:

[] spawn {
   while {true} do {

	_Var = player getVariable "TasksAdded";

	if (isNil "_Var") then {

		Task1 = player createSimpleTask ["Move to barrel!"];
		Task1 setSimpleTaskDescription ["Move to barrel!", "Move to barrel!", ""];

		if (!isNil "Task1Accomplished") then {
			Task1 setTaskState "Succeeded";
		};

		player setvariable ["TasksAdded", true];

	};

       _OldPlayer = (vehicle player);
	waitUntil {(_OldPlayer != (vehicle player) && (vehicle player) isKindOf "Man")};
};
};

But i have no idea about the second one. I mean even this way it doesn't show up at debriefing:

Task1 = player createSimpleTask ["Move to barrel!"];
Task1 setSimpleTaskDescription ["Move to barrel!", "Move to barrel!", ""];
Task1 setTaskState "Succeeded";

sleep 2;
endMission "END1";

That's strange indeed.

Im afraid i cant help you on that, i never used the switch units stuff. :(

Lets hope there's someone around with some experience on that.

Share this post


Link to post
Share on other sites

Ok, now I know a little more! I've tried a lot of different things, and found out that the unit's objectives list that I see in end debriefing belong to the unit which I played when mission started. I mean, if I started mission as player "p1", then switch to "p2" and then finishes mission as "p2", then I will see p1's objectives list in the end debriefing screen. And if p1 dies before I end mission (and I am p2), then i will get a blank screen.

So conclusion is, the game itself somehow keeps track of who was my initial unit. Question is, is there a workaround if I still want to see the whole list of objectives no matter if my original unit is still alive or not? Anyone?

sxp2high, you said that the tasks are for players only, but I think they actually should be assigned per unit. You see that if you switch unit and check tasks on map (or by just pressing 'J'). Thank you very much for your efforts!

Edited by Engima

Share this post


Link to post
Share on other sites

I found this on the wiki, which proved me wrong (sorry) seems like tasks are indeed unit specific.

So that would be the simplest way to assign it to all units:

{
Task1 = _x createSimpleTask ["Move to barrel!"];
Task1 setSimpleTaskDescription ["Move to barrel!", "Move to barrel!", ""];
} forEach [p1,p2,p3];

But i still dont know about the debriefing screen.

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  

×