Space Engineers

Space Engineers

70 ratings
Automatic Door Close
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
2.495 KB
16 Jan, 2015 @ 5:59pm
5 Apr, 2015 @ 9:50am
3 Change Notes ( view )

Subscribe to download
Automatic Door Close

Description
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 Comments
Zeno1392 15 Aug, 2023 @ 8:22am 
i can't get it to work i have put "AutoClose" in every name but it still doesnt work
rafikiman 29 Apr, 2021 @ 8:11pm 
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:37am 
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:45am 
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:24am 
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:01am 
when i try compile it gives me an error
Kakskjiv 15 Jun, 2020 @ 12:03pm 
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:44am 
This works perfect. Always wanted a proper 'all' door closing script.
Nice work.
br8den 15 Feb, 2020 @ 2:30pm 
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 @ 1:15pm 
Thanks for the fix, @Risa Koizumi !