Forum Jump :

Author Message


Posts: 22
Rank:


Level: Member

Country: us
Location: Jupiter, Cloud 9
Occupation: Plant Burner
Age: 87
In-game name: war1ox

 
#1 Posted at 2015-09-16 13:16        
     
Hello, I found this script that closes all doors on the map. Does anyone know how to modify it so that it works decently? It closes the doors, but it doesn't seem to stop running after completed. I can wait 5 minutes and the frames will stay at 15 like it's still working but it's not. SCRIPT

Steam: war1ox

Author Message

B33F  



Posts: 8
Rank:


Level: Member

Country: 00
Location:
Occupation:
Age:
In-game name:

 
#2 Posted at 2015-09-16 17:33        
     
i assume you want this for ArmA 2 since the doors are closed by default in ArmA 3.
The way I do that is to place an object in the middle of the map (like an invisible helipad) then paste the following in the objects init/act:

0 = [getpos this,10000] 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)) };

Change the number 10000 to fit the size of the radius where you want the doors close. 10000 is 10 kilometers.
hope that helps.


Advertisement


Author Message


Posts: 22
Rank:


Level: Member

Country: us
Location: Jupiter, Cloud 9
Occupation: Plant Burner
Age: 87
In-game name: war1ox

 
#3 Posted at 2015-09-16 21:34        
     
I seen that somewhere and tried it with no luck. Do you have this working currently? I've tried twice now and can't get it to work. I simply placed the helipad with the code in the init field.

I noticed there are only two door names on that init, and there are like 25 on the other script. I tried adding the door names to your script & placing it into the map but no luck.

The original script I posted definitely works but it's so memory intensive that it locks the frames to 12 and continues on forever.

Steam: war1ox

Author Message

B33F  



Posts: 8
Rank:


Level: Member

Country: 00
Location:
Occupation:
Age:
In-game name:

 
#4 Posted at 2015-09-17 01:57        
     
sorry it's been a long time since I used that, I should have mentioned it only works with Operation Arrowhead maps, not maps like Cherno or Utes. I just tested it and it does still work in Takistan but not Cherno. I never found a working solution to Cherno type maps. Sorry.


Author Message


Posts: 22
Rank:


Level: Member

Country: us
Location: Jupiter, Cloud 9
Occupation: Plant Burner
Age: 87
In-game name: war1ox

 
#5 Posted at 2015-09-17 03:17        
     
No biggie, thanks for your input anyways. Maybe someone else will chime in here shortly. It's a shame the Arma 2 community is shrinking, it's a classic!

EDIT: I got the first script to work faster by only using the main doors that I needed to close (fire stations & the small field barracks). The original script itself works I guess but like I said it's very memory intensive so I had to remove some doors, mostly all of them.

Here's a script I got to work that just closes the fire station doors and the small field barracks door.

This post was edited by war1ox (2015-09-17 07:16, ago)

Steam: war1ox

Author Message


Posts: 1
Rank:


Level: Member

Country: br
Location: Curitiba
Occupation: Airline Pilot
Age: 47
In-game name: flaviotaw@yahoo.com.br

 
#6 Posted at 2015-10-02 16:34        
     
Hello,

I tryed and works fine for me in Zargabad. I activated the script via trigger, but my source was this one: http://www.ofpec.com/forum/index.php?topic=33618.0

Hope it helps.