fencr0c 10 Posted March 15, 2011 (edited) I've been staring at this bit of code for several hours and dont see why its not working. _loc=[696.712,8334.23,0] _trgname="_trigger"; _trgstsfld="areaclear"; call compile format["%1=createTrigger[""EmptyDetector"",%2]",_trgname,_loc]; call compile format["%1 setTriggerArea[300,300,0,false]",_trgname]; call compile format["%1 setTriggerActivation[""GUER"",""NOT PRESENT"",false]",_trgname]; call compile format["%1 setTriggerStatements[""this"",""%2=true;"",""""]",_trgname,_trgstsfld]; call compile format["waitUntil {%1}",_trgstsfld]; It should do the following, but the areaclear is never set so I assume the trigger is not firing. The only unit on the whole map is me a BAF soldier. _trigger=createTrigger["EmptyDetector",[696.712,8334.23,0]]; _trigger setTriggerArea[300,300,0,false]; _trigger setTriggerActivation["GUER","NOT PRESENT",false]; _trigger setTriggerStatements["this","areaclear=true;",""]; waitUntil {areaclear}; Edited March 15, 2011 by fencr0c Share this post Link to post Share on other sites
shuko 59 Posted March 15, 2011 Missing semicolon after the loc at least. But, can't you just do something this: _loc=[696.712,8334.23,0]; _trigger=createTrigger["EmptyDetector",_loc]; _trigger setTriggerArea[300,300,0,false]; _trigger setTriggerActivation["GUER","NOT PRESENT",false]; _trigger setTriggerStatements["this","",""]; waituntil {triggeractivated _trigger}; Share this post Link to post Share on other sites
fencr0c 10 Posted March 15, 2011 The missing semi colon after the _loc was a typo on the post only. Learning this scripting as I go along, will try the triggeractivated command. Thanks for the help. Share this post Link to post Share on other sites