z_arma 10 Posted August 7, 2009 Hi all, I want to use a trigger as a parameter to a checktrigger.sqf file. In checktrigger.sqf how can i read the trigger name ? The caller function testmarker.sqf { _mk = _x ; _mk setMarkerShapeLocal "ELLIPSE"; _mk setMarkerSizeLocal [350, 350]; _mk setMarkerColorLocal "ColorRed"; _mk setMarkerTextLocal _mk; _mpos = markerPos _mk; call compile format["ok%1=false",_x]; call compile format["t%1=createTrigger['EmptyDetector',_mpos]",_x]; call compile format["t%1 setTriggerArea [350, 350, 0, false]",_x]; call compile format["t%1 setTriggerActivation ['WEST', 'PRESENT', true]",_x]; call compile format["t%1 setTriggerStatements['this', 'xhandle = [this] execVM ''checktrigger.sqf'';', 'ok%1=false']",_x]; [(side player),"HQ"] sidechat format["%1 ",_x]; } forEach markers; Now the checktrigger.sqf _trigger = _this select 0; // marqueur associé au trigger _who = list _trigger; // qui entre [(side player),"HQ"] sidechat format["trigger : %1 who : %2 ", _trigger,_who select 1]; if (true) exitWith {}; The result in checktrigger function is for _trigger "ANY" when i want to have the trigger. What is wrong ? Share this post Link to post Share on other sites
atledreier 10 Posted April 25, 2010 Old post, same problem. I need to pass a trigger to a script. I have an 'BluFor present' trigger. OnAct: actionid = player addAction ["Plant explosive", "PlantExplosives.sqf",[Triggername,1]] The PlantExplosives.sqf need the triggername, since I need to check who's in it's list. Share this post Link to post Share on other sites
shuko 59 Posted April 26, 2010 What is wrong ? Pass thislist instead of this to the script and you don't need to list it. ---------- Post added at 10:03 AM ---------- Previous post was at 10:00 AM ---------- actionid = player addAction ["Plant explosive", "PlantExplosives.sqf",["Triggername",1]] PlantExplosives.sqf: call compile format ["_list = list %1",(_this select 3) select 0]; Share this post Link to post Share on other sites