Rommel 2 Posted July 5, 2010 (edited) 0 = [getpos this,300] spawn { sleep 1; { private "_b"; _b = _x; for "_i" from 0 to 7 do { _b animate ["dvere" + str _i,1] }; } foreach ((_this select 0) nearobjects (_this select 1)) } I thought this code to be so bloody useful in the now prominent and constant CQB setting we find ourselves within OA, how can I close all the doors. :p That others may want it also; enjoy. EDIT: We need a code snippets thread for things like this. Edited July 5, 2010 by Rommel Share this post Link to post Share on other sites
f2k sel 164 Posted July 5, 2010 It would be nice as it can be a pain finding the right bit of code, 4I was looking for a bit of code like that the other day. Share this post Link to post Share on other sites
nominesine 0 Posted July 5, 2010 EDIT: We need a code snippets thread for things like this. What about this place ;) Share this post Link to post Share on other sites
W0lle 1052 Posted July 5, 2010 Interesting, last night I was looking for a solution like that and here it is. :) EDIT: We need a code snippets thread for things like this. Well why you just don't create one then? :p Share this post Link to post Share on other sites
RodeoX 10 Posted July 5, 2010 Thanks for the code Rommel, and I fully support the idea of snippets threads. Share this post Link to post Share on other sites
Jelliz 10 Posted July 5, 2010 Make a code snippet thread, and link to it in your sticky FAQ thread Share this post Link to post Share on other sites
mia389 10 Posted July 5, 2010 lol, On my mission lastnight I was placing all kinds of game logics to do this. Perfect timing. Now I can go clean it up with this code. Thank you much for sharing! Share this post Link to post Share on other sites
Woodstock21 10 Posted July 21, 2010 so umm heres a very noob question where would i put that code to close the doors, i just wanna add it into the domination map, for the main base and a little FOB i created for my group of guys? Share this post Link to post Share on other sites
pineapple-yetti 10 Posted July 22, 2010 i thoguth maybe there could be a place for this in the Biki as it seems a good community edited place to house it Share this post Link to post Share on other sites
Woodstock21 10 Posted July 22, 2010 i placed it in the init line of a invisable H, and it seems to only close the single doors...I put it in the mine by Farad Adad, and the big garage and cargo container doors stayed ope, buy the single doors on the house closed. Share this post Link to post Share on other sites
BigMorgan 11 Posted July 22, 2010 Amazing, I come onto the forum thinking it could take 2-3 hours to learn how to write ninety pages of BIS script to close doors and instead I find this in less than 10 seconds. KUDOS TO YOU ROMMEL! <3 lol Share this post Link to post Share on other sites
Riserburn504 0 Posted July 24, 2010 I tried to use this script with both an invisible H and a trigger but with no luck. I have the code saved as "door.sqf" and saved it in the init file. in the init (for the H) and/or in the on act (for the trigger) i put "null = [this] execVM "doors.sqf"; no dice, I also took the "[]" off "this", no dice. Its going to be something really stupid I'm sure, as I'm all thumbs with this stuff. Any help would be greatly appreciated! Its on the Zargabad map if that makes a difference. Share this post Link to post Share on other sites
Woodstock21 10 Posted July 24, 2010 all i did was copied the code rigt into the init line of the invis H and it works, just doens't close double-sided doors for me atleast Share this post Link to post Share on other sites
Riserburn504 0 Posted July 24, 2010 that did it.. thx Share this post Link to post Share on other sites
rexehuk 16 Posted July 24, 2010 I placed in gameLogic and it closes every single door within the radius. This includes the double wooden doors at the Zargabad market area. Share this post Link to post Share on other sites
f2k sel 164 Posted July 24, 2010 (edited) Odd I've placed the code in a gamelogic and H and nothing not a single door closes. Well it does work but not on the first lot of doors I tried it on, it seems not to work on barracks or control tower doors or older Arma2 buildings. It seemsto close the door on some buildings it's _b animate ["dvere" + str _i,0] not _b animate ["dvere" + str _i,1] even then I still find doors that aren't working with the script but will work manually. Edited July 24, 2010 by F2k Sel Share this post Link to post Share on other sites
Woodstock21 10 Posted July 25, 2010 a game logic you say humm ill have to try that tormmorow Share this post Link to post Share on other sites
CarlGustaffa 4 Posted October 29, 2010 (edited) Anyone know the door anims for the long barrack objects (mil_barracks_i.p3d) found at the Utes airport? Never mind, found it. "Door_01". All thanks to Arma1 config explorer :) Edited October 29, 2010 by CarlGustaffa Share this post Link to post Share on other sites
nouty 10 Posted December 18, 2011 Thank you for this Rommel, you're a life saver. And thank you as well CarlGustaffa for finding that barracs door anim. It was driving me crazy :) Share this post Link to post Share on other sites
f2k sel 164 Posted December 18, 2011 Just be careful opening and closing doors, if you quit a game while the doors are in transition they will fail to operate again until a new map is loaded. This had been fixed in the latest beta patches. Share this post Link to post Share on other sites
semedar 0 Posted December 18, 2011 Awesome. :) And someone make a snippets thread right away! It would probably be the most popular thread in this section. :D Share this post Link to post Share on other sites
thedog88 4 Posted November 15, 2012 hate to bring up an old thread, i just wanted to say thank you, this is an amazing and easy to use script! :) hope it works in MP Share this post Link to post Share on other sites
avibird 1 155 Posted November 15, 2012 (edited) Interesting, last night I was looking for a solution like that and here it is. :)Well why you just don't create one then? :p You guys did a long time a go forums.bistudio.com/showthread.php?120270-Scripts-for-newbies-guide Edited November 15, 2012 by AVIBIRD 1 link to page Share this post Link to post Share on other sites