ringoray 1 Posted December 31, 2013 Hello guys, I am in the process of making a few custom compositions with the object grabber.sqf. I have made a small checkpoint that contains a bar gate. Is it possible via some scripting to have these bar-gates open and close when approached? I already know the code to make editor placed gates open and close but doing it for these compositions is beyond my knowledge. Any help would be appreciated. Share this post Link to post Share on other sites
iceman77 19 Posted December 31, 2013 (edited) After creating the composition you can reference the bargate with nearestObject or something similar. _bargate = nearestObject [somePosition, "bar_gate_class"]; if (!isNull _bargate) then { _id = _bargate addAction ["operate", {call Tag_fnc_barGateAnim}]; //add the action or w/e }; Edited December 31, 2013 by Iceman77 Fixed typos Share this post Link to post Share on other sites
ringoray 1 Posted December 31, 2013 Cheers IceMan, will try it out. Very disappointed with your monster pc by the way haha very funny, I like it. Share this post Link to post Share on other sites
alky_lee 279 Posted December 31, 2013 Have a look at Road Block Script by I34dKarma http://www.armaholic.com/page.php?id=23004 It is also available as a mod. Both the script and the mod work really well. Share this post Link to post Share on other sites
ringoray 1 Posted December 31, 2013 Yeah Alky seen those already and they do indeed work very well indeed. I was just trying to build my own and see if I could get them working. Mine is working fine but, when i spawn the composition now the checkpoint faces the way that i made it in the editor, as in a cant rotate it to suit where I want it place, any ideas guys why this is happening? Share this post Link to post Share on other sites
ghostjaeger07 10 Posted December 31, 2013 I use a simple trigger to activate the gate. Put this into the trigger: \\Activation: Blufor \\Condition: this \\On Act: tor1 animate ["Door_1_rot", 1]; off1 \\On Dea: tor1 animate ["Door_1_rot", 0]; off1 Name the gate: tor1 Then in the gate init line put: this allowdamage false; Then whenever a unit goes into the trigger area the gate opens until all units leave the area. Share this post Link to post Share on other sites