DamianBope 1 Posted March 24, 2022 script for opening the bar gate. this bar gate is placed in the map. once had an object id script to open the bar gate. but can't find it anymore, it was something with nearestobject! can someone help me Bar-Gate object picture 1 Share this post Link to post Share on other sites
RS30002 28 Posted March 24, 2022 Hide it with a module, put the bargate from the editor in it's place for which you can find code easily 🙂 Probably not the answer you were looking for and cuz imma a nub, probably not the best advice, but it should work until someone comes in with a better solution 🙂 1 Share this post Link to post Share on other sites
pierremgi 4913 Posted March 25, 2022 Depending on your map... DYA? You can add a squared trigger centered on your bargate and choose a condition like BLUFOR present, repeatable. Your bargate could be identified by: nearestTerrainObjects command type "house" (probably) from this trigger, so something like: yourBarGate = (nearestTerrainObjects [getPos thisTrigger, ["house"],20,true,true]) select 0 Note: you can name the trigger or use thisTrigger (as above), specific variable working inside the trigger's fields. After that you can open close the bargate with a little anim code. See this post. I can't say your bargate is this class name but you can check that in preview mode, pointing at the bargate and asking for : typeOf cursorObject in one of the four watch lines (esc to debug console). 1 Share this post Link to post Share on other sites
Diaverso Carrasco 1 Posted March 26, 2022 Here you have a composition that does it automatically. https://steamcommunity.com/sharedfiles/filedetails/?id=2462201688&searchtext=open+gate Share this post Link to post Share on other sites