OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting Multiplayer => Topic started 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:
TASK1 = true; "TASK1" setMarkerColor "ColorGreen"; "TASK1" setMarkertext "TASK1 Complete"; MAG_tskObj0 settaskstate "Succeeded"; hint "TASK 1 Complete";
In the briefing file I have this:
_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):
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:
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"];
-
In the briefing file I have this:
You are using local variable instead of global for the task.
-
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.
-
_MAG_tskObj0 is local
MAG_tskObj0 is global
You can't use settaskstate from a trigger to update the local one.
-
Thanks Shuko...sucks a little _ can wipe things out :P