zuff 10 Posted March 12, 2013 (edited) Using the F3 framework, I am in the f_briefing_nato.sqf and I've created a task: _task2 = player createSimpleTask ["OBJ_2"]; _task2 setSimpleTaskDescription ["Destroy AA Camps along your way to protect the helicopter during extraction.", "Destroy AA Camps 1", "AA CAMP 1"]; _task2 setSimpleTaskDestination (getMarkerPos "aa1"); _task2 setTaskState "Created"; Now I want that task to be set to Succeeded after a certain man dies. I've made an OPFOR named "aa1_man" and put this below the tasks' script: _trg2 = createTrigger ["EmptyDetector", getPos player]; _trg2 setTriggerArea[0,0,0,false]; _trg2 setTriggerActivation ["NONE", "NONE", false]; _trg2 setTriggerStatements ["!alive aa1_man","_task2 setTaskState 'Succeeded'",""]; The trigger does work, as I've got it to produce a hint, but with "_task2 setTaskState 'Succeeded'" I get no results. I've even tried "OBJ_2 setTaskState 'Succeeded'" and I've tried "'OBJ_2' setTaskState 'Succeeded'" but still no luck. Any tips? With this code: _trg2 = createTrigger ["EmptyDetector", getPos player]; _trg2 setTriggerArea[0,0,0,false]; _trg2 setTriggerActivation ["NONE", "NONE", false]; _trg2 setTriggerStatements ["!alive aa1_man","hint 'yes this works'",""]; it does work, here's a screenshot: http://steamcommunity.com/sharedfiles/filedetails/?id=131918498 I'm sure it has something to do with locality and local variables, but I figured if they are all being call in the same sqf it should work. I'm lost! Edited March 12, 2013 by zuff Share this post Link to post Share on other sites
dga 12 Posted March 12, 2013 yeah...well vars with underscore are local to your script. if you remove the underscore, it would be global and be accessed from anywhere. and besides that...try this ["OBJ_2", "Succeeded"] call BIS_fnc_taskSetState; Share this post Link to post Share on other sites