dimdic 1 Posted January 18, 2012 (edited) Which is the script command to attach a unit to a trigger ?? I found the command "triggerName triggerAttachObject objectId" but i don't know what exactly is the objectId parameter! Can i use instead of objectId the unit's name?? Or is there any way to find a unit's objectId ? Thank you OR in the command "trigger setTriggerActivation [by, type, repeating]" in the "by" parameter can i put a soldier's name or a leader of a group ?? Here http://community.bistudio.com/wiki/setTriggerActivation it says: By : may be Object: "STATIC", "VEHICLE", "GROUP", "LEADER", "MEMBER" so if i put "LEADER" the trigger is activated in the present of any leader ??? Or can i put a specific unit name who is leader?? Edited January 18, 2012 by dimdic Share this post Link to post Share on other sites
twirly 11 Posted January 18, 2012 (edited) You can do it like this.... First create the trigger... this is the example from the wiki page createTrigger modified slightly. //create trigger at player's location _trg=createTrigger["EmptyDetector",getPos player]; //set the area to 50 x 50...rotation angle 0...trigger is a rectangle _trg setTriggerArea[50,50,0,true]; //trigger activated by anyone present... repeatedly _trg setTriggerActivation["ANY","PRESENT",true]; //to detect a soldier named wsold1 _trg setTriggerStatements["this && wsold1 in thislist", "hint 'wsold1 IS in the trigger area'", "hint 'wsold1 IS NOT in the trigger area'"]; Using the condition ("this && wsold1 in thislist") in setTriggerStatements is how you would detect a specific guy/object whatever. Here it looks for wsold1... and only if wsold1 is present... will it fire with the hint wsold1 IS in the trigger area. I personally am not familiar with all those other parameters.. "STATIC", "VEHICLE", "GROUP", "LEADER", "MEMBER" etc.... and haven't seen them used! Use triggerAttachVehicle to attach the trigger to the unit. Edited January 18, 2012 by twirly Clarity (I hope!) Share this post Link to post Share on other sites
nomadd 63 Posted January 19, 2012 Not sure if this helps but name a trigger , name the object\unit etc use triggername attachto [objectname,[0,0,0]]; have used this is quite a few missions. Usually attached to a unit , that either needs capture/rescue. In the trigger just put whatever it is you want done. Nomadd Share this post Link to post Share on other sites
dimdic 1 Posted January 20, 2012 thank you for your help ! Share this post Link to post Share on other sites
igneous01 19 Posted January 20, 2012 Here http://community.bistudio.com/wiki/setTriggerActivation it says: By : may be Object: "STATIC", "VEHICLE", "GROUP", "LEADER", "MEMBER" so if i put "LEADER" the trigger is activated in the present of any leader ??? Or can i put a specific unit name who is leader?? Leader param means that the leader that the trigger is grouped to will fire only. This only works if the trigger is grouped to that group, and only the leader of the group can fire off the trigger. Group is same thing, except I think it checks for the entire group inside. Member is it checks for any member in the group. Vehicle is related to group vehicle (if there is one) static means static weapon I think. These params only work if the trigger is grouped to the group. Share this post Link to post Share on other sites