black_hawk_mw2_87 74 Posted July 26, 2019 Hi, everyone! I am looking for a script to lock all doors of the buildings around at a certain area? So, there could be a marker or trigger, which shows the location, where all doors should be set to locked. The main idea is, that these are not buildings placed down in the editor, otherwise I would not have any problems with that, but buildings that are already existing on a map. I think that the Game Logic module should be placed down as well, but what else should I do to make this work for me? Thank you in advance! 🙂 Share this post Link to post Share on other sites
Play3r 147 Posted July 26, 2019 https://www.youtube.com/results?search_query=how+to+lock+doors+in+arma+3 Maybe any one off these will help you and this function also BIS_Disabled_Door 4 Share this post Link to post Share on other sites
black_hawk_mw2_87 74 Posted July 29, 2019 I didn't find my answer in the list, but I am sure I've seen such a script for locking all doors at certain area, which should be marked by a marker or a present triggere - something I also can't remember. Would anyone help me with this issue? 🙂 Share this post Link to post Share on other sites
Smart Games 76 Posted July 29, 2019 Maybe this works: 1) create a init.sqf and a fnc.sqf 2) type in init.sqf: [] execVm “fnc.sqf“; 3) type in fnc.sqf: fnc_lock_doors = { _pos = _this select 0; _range = _this select 1; _houses = nearestObjects [_pos, ["house"], _range]; {_x setVariable [“BIS_Disabled_Door_1“,1,true]} foreach _houses; { _x setVariable [“BIS_Disabled_Door_2“,1,true]} foreach _houses; { _x setVariable [“BIS_Disabled_Door_3“,1,true]} foreach _houses; { _x setVariable [“BIS_Disabled_Door_4“,1,true]} foreach _houses; //and so on.. }; 4) Whenever you want to use the lock script use this: //[position,range] call fnc_lock_doors;\\ for example: [[100,200,0], 300] call fnc_lock_doors; Maybe it works, idk.. had no time to test it 2 Share this post Link to post Share on other sites
black_hawk_mw2_87 74 Posted July 29, 2019 (edited) Thank you, everyone! The easiest and fastest way is this: You can do it with a module from within the editor. Systems > Modules > Environment > Edit Terrain Object. Just place it on the building (building should show with purple box) open the modules attributes and door open/closing/locking is all in there. Unless this is something your trying to do at runtime after some condition as the module does not seem to support being tied to a trigger. Cheers! 🙂 Edited July 30, 2019 by Dedmen Removed all-bold. Rule 12 3 Share this post Link to post Share on other sites
Smart Games 76 Posted July 29, 2019 But if you want to close all doors in a bigger area, the script i gave you is much better 🙂 Place 100 modules and set them up, why not 🙂 1 Share this post Link to post Share on other sites
Play3r 147 Posted July 29, 2019 55 minutes ago, Smart Games said: But if you want to close all doors in a bigger area, the script i gave you is much better 🙂 Place 100 modules and set them up, why not 🙂 i believe you can change the radius in the modules. But not sure. Share this post Link to post Share on other sites
black_hawk_mw2_87 74 Posted July 29, 2019 1 hour ago, Smart Games said: But if you want to close all doors in a bigger area, the script i gave you is much better 🙂 Place 100 modules and set them up, why not 🙂 I actually did that. There were about 25 modules... 🙂 I was patient enough, don't worry. And still, when I have time, I will test your way, too! 🙂 Thank you! 1 Share this post Link to post Share on other sites
Smart Games 76 Posted July 29, 2019 🙂I hope it will work 🙂 1 Share this post Link to post Share on other sites