OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting Multiplayer => Topic started by: RangerX3X on 18 Feb 2010, 07:02:38

Title: How to mark a task as complete in the briefing and debriefing? [SOLVED]
Post by: RangerX3X on 18 Feb 2010, 07:02:38
This works for me in SP but not in MP:

In the first objective I have this in the on activation field of the trigger:

Code: [Select]
TASK1 = true; "TASK1" setMarkerColor "ColorGreen"; "TASK1" setMarkertext "TASK1 Complete"; MAG_tskObj0 settaskstate "Succeeded"; hint "TASK 1 Complete";
In the briefing file I have this:

Code: [Select]
_MAG_tskObj0 = player createSimpleTask ["Secure Lopatino"];
_MAG_tskObj0 setSimpleTaskDescription ["All enemy forces in <marker name='TASK1'>Lopatino</marker> must be eliminated", "Secure Lopatino", "Secure Lopatino"];
_MAG_tskObj0 setSimpleTaskDestination TASK1;
_MAG_tskObj0 setTaskState "Created";

The mission ends correctly using this in a victory condition end trigger (set to switch per F2 instructions):

Code: [Select]
myEnd = [1] execVM "f\server\f_mpEndBroadcast.sqf";
The problem that I am running into is that the green light does not come on to indicate that the objective has been satisfied in the briefing and debriefing section when the mission ends.

Is this a common problem in MP briefings/debriefings or is there something that I am missing?

For reference this is what I use in the briefing for SP and it works:

Code: [Select]
MAG_tskObj0=player createSimpleTask ["Secure Lopatino"];
MAG_tskObj0 setSimpleTaskDescription ["The town of <marker name='TASK1'>Lopatino</marker> must be cleared of all enemy forces.","Secure Lopatino","Secure Lopatino"];
Title: Re: How to mark a task as complete in the briefing and debriefing?
Post by: Shuko on 18 Feb 2010, 12:24:23
Quote
In the briefing file I have this:

You are using local variable instead of global for the task.
Title: Re: How to mark a task as complete in the briefing and debriefing?
Post by: RangerX3X on 18 Feb 2010, 21:26:31
Care to explain?

I am using the briefing from F2 for MP missions so it would help if you could be specific as to what part of the briefing is wrong. As stated above everything works except the green light.
Title: Re: How to mark a task as complete in the briefing and debriefing?
Post by: Shuko on 19 Feb 2010, 11:39:30
_MAG_tskObj0 is local
MAG_tskObj0 is global

You can't use settaskstate from a trigger to update the local one.
Title: Re: How to mark a task as complete in the briefing and debriefing? [SOLVED]
Post by: RangerX3X on 19 Feb 2010, 19:49:27
Thanks Shuko...sucks a little _ can wipe things out  :P