Space Engineers

Space Engineers

75 betyg
Automatic Door Close
   
Utmärkelse
Favorit
Favoritmarkerad
Avfavoritmarkerad
Filstorlek
Lades upp
Uppdaterades
2.495 KB
16 jan, 2015 @ 17:59
5 apr, 2015 @ 9:50
3 ändringsnotiser ( visa )

Abonnera för att ladda ner
Automatic Door Close

Beskrivning
This script does exactly what it says in the title. Doors will automatically close 1 to 2 seconds after you open them, so you dont have to go around closing everything all the time if you are fussy like me.

How To Use:

Ensure that no two doors have the same name for this script to run properly.

Place a Timer block on the ship along with the programmable block. Set the timers Delay to as low as possible, and setup the timers Actions to:

1 - Programmable Block - Run.
2 - Timer Block - Start.

and you should be good to go.

If the doors sometimes close too quickly, you can change the DoorOpenTime value in the script to about 2 or 3 and that should stop that issue.

*EDIT*
I have modified the script so that it ignores all doors that dont include the prefix "AutoClose" in its name. The name's still have to be unique, but it must contain that text in the name somewhere. More details on this are in the script. If you have any questions, drop a comment below.
44 kommentarer
Valykino 15 aug, 2023 @ 8:22 
i can't get it to work i have put "AutoClose" in every name but it still doesnt work
rafikiman 29 apr, 2021 @ 20:11 
After you make the corrections to the code, you have to manually start the timer block once its setup and it works perfectly!
Boomheadshotoverkill 25 mar, 2021 @ 8:37 
I put the edit's in like Risa said and the script still won't work. Looking for help because I very much like this mod and am said that it is currently not working for me.
{H.K.}Warlama 21 dec, 2020 @ 11:45 
EDIT: for some reason after compiling i rechecked everything for errors.
for some reason the programmable block got shut off. not sure how it happened.
i turned it back on and the script appears to be working again??.
I wont question it, i will accept it though.

I will repost if i find other errors.
{H.K.}Warlama 21 dec, 2020 @ 11:24 
tried using the script after a long time away. made the fixes to lines 59 and 184.
recompiled the script with no errors, yet the script wont run
Ghost Wolf 27 jul, 2020 @ 5:01 
when i try compile it gives me an error
Kakskjiv 15 jun, 2020 @ 12:03 
one questin, I want the door to close slightly faster, but wriiting in 0,5 or 0.5 fives me an error. I'm no coder so I wonder if 1/2 of a second shuld be written differently?
Zoc 1 apr, 2020 @ 3:44 
This works perfect. Always wanted a proper 'all' door closing script.
Nice work.
br8den 15 feb, 2020 @ 14:30 
This script is a pure delight. One operating brain to run all my door behaviors. Thank you. And thank you Risa Koizumi for the edit.
Utburd 13 apr, 2019 @ 13:15 
Thanks for the fix, @Risa Koizumi !