Space Engineers

Space Engineers

Automatic Door Close
44 comentarios
Valykino 15 AGO 2023 a las 8:22 
i can't get it to work i have put "AutoClose" in every name but it still doesnt work
rafikiman 29 ABR 2021 a las 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 a las 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 DIC 2020 a las 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 DIC 2020 a las 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 a las 5:01 
when i try compile it gives me an error
Kakskjiv 15 JUN 2020 a las 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 ABR 2020 a las 3:44 
This works perfect. Always wanted a proper 'all' door closing script.
Nice work.
br8den 15 FEB 2020 a las 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 ABR 2019 a las 13:15 
Thanks for the fix, @Risa Koizumi !
dark_mift 23 JUL 2018 a las 9:08 
Script is no longer viable
classicpark 2 MAY 2018 a las 10:43 
Why the creator is not updating this script its a cool script
Risa Koizumi 1 ENE 2018 a las 2:07 
Capitalization counts! :)

For those trying to mod this script and getting context errors, the lines that need changing are line 59 and 184. Change these from:
if (doorblock.open)
to:
if (DoorBlock.Status == DoorStatus.Open)
Press "Remember and Exit" and then Recompile.

This will fix this script and it will work as it should.

And as a tip, if you rename your doors after recompiling, even from "AutoClose_Door" to "AutoClose_DoorA" or to "Door [AutoClose]" (all of which will work) remember to recompile again, or the script will completely stop functioning. Have fun!
Addicted2Breathing 3 OCT 2017 a las 16:58 
@Chara I tried your fix but now I am getting the error: The name 'Doorblock' does not exist in the current context
any chance you can lean on your friend to figure out what else they did to fix the code?
Chara 13 MAY 2017 a las 22:40 
If it helps and for those of you who like this script, take the lines 59 and 183 i think it was, and change the (doorblock.open) to (Doorblock.Status == DoorStatus.Open). should work again.
At least it did for me after my friend fixed the coding on those two obsolete lines. Cant help further than tell you what he did for me.
pyr0kid 27 FEB 2017 a las 20:33 
so what, this doesnt work anymore?
Kaiash 13 FEB 2017 a las 8:17 
it tells me iMydoor.Open is Obsolete
DMMWolf 13 FEB 2017 a las 8:15 
was just going to comment about obsolete commands but someone beat me to it
HachiiCatt 6 FEB 2017 a las 17:40 
getting some obsolete errors
{H.K.}Warlama 26 DIC 2016 a las 12:34 
thank you for this script. i just tried it, i followed the instructions then i sat waiting for a door to auto close....and it worked. this is wonderful friend. much love and respect to you. well done!
Bradster2214 10 SEP 2016 a las 17:35 
(Reply to my last comment)
never mind, i reset the timer block's 1st function and changed it to run with default script then back and it works fine now. THANK YOU SO MUCH KIND SIR :P
Bradster2214 10 SEP 2016 a las 17:32 
My doors do not close had i have them named accordingly:
AutoClose_outer_left
AutoClose_outer_right
AutoClose_inner_left
AutoClose_inner_right
i have the timer block's actions set correctly, and the delay set to 1, and yes the ship has power
Vas 21 AGO 2016 a las 20:08 
Oh and another good thing you could do, is have doors with set auto close frequencies. [AutoClose:1] [Autoclose:5] (1 second or 5 seconds), like the cargo sort script does with its modifiers and such.
http://gtm.steamproxy.vip/sharedfiles/filedetails/?id=321588701
Vas 19 AGO 2016 a las 18:58 
A better method that could conserve some CPU power, is if you have the script automatically close doors each time the script is run, then you can have the timer set to run every 2-5 seconds and it will close doors when the timer clicks on. However, this could coincidently happen the instant you try to open a door if the script is run at that time, so. It was just a thought.
Galactus 16 AGO 2016 a las 22:56 
One of my doors wont close Automatically, it is only one though. The line is in the name and everything.
Dancing Bastard 30 JUN 2016 a las 15:10 
Hello friend, I can't seem to get it work. Would you please go into more details as to where place the blocks and stuff like that? Here's how I've set it up and it doesn't work - I don't know how should it open since I don't have any sensors to sense me coming. And...what's the "argument" I get when I link the programmable block into the timer actions?

Here are some screenshots of my setup on creative:
https://gyazo.com/e4098b2e7d7b12352d142d1fc2d10835 <- door name
https://gyazo.com/a6afd066a4c791d4e50461eecc975000 <- timer actions (run/start)
https://gyazo.com/55fa4b058597c7231437ea8ae2f736be <- how it looks from the side.

The door won't open. No idea why, appreciate any help:) Thanks!
⎠Byte™⎝ 11 MAY 2016 a las 8:14 
great script ;)
Cherubiel 10 FEB 2016 a las 14:15 
Doesn't close doors >_<
Maybe its the sliding doors I'm using this for?
Majky 3 NOV 2015 a las 11:22 
Superb script..
I cant do programing/scripting... is it hard ? I would like to have a script to my borg cube.
Problem : The borg cube have many hundreds of welders. And when they are turned on the sim speed goes down to 0.25 (or something like that)
My desire : Have a script that turns on maby 40 welders for a couple of seconds and then turn them off and then turn the next 40 welders on for a couple of seconds and so on...
Is that something you could do ?
EvilMatt 16 JUL 2015 a las 18:11 
Has anyone else been able to get this working on a dedicated server? I have everything set up right. Maybe the server needs a restart?
bady89 1 JUL 2015 a las 11:28 
NICE !!!
Mexican Dave  [autor] 5 ABR 2015 a las 9:59 
Hey guys. Sorry for the delay! I have updated the script, it now ignores any doors that don't contain "AutoClose" in the name, so you can set which doors are automatically closed. There are more details in the script so give it a quick read.

Could somebody let me know that the script updated fine, this is my first time updating a workshop item and i want to make sure it all went smoothly.
MaverickSawyer 3 ABR 2015 a las 20:16 
Overall, a nice bit of coding. However, as others have noted, it doesn't have a way to mark something to be left alonne. It causes the Stargates in the the Stargate mod pack to close after two seconds... not really ideal for moving lots of people or stuff through it.
Larynx 29 MAR 2015 a las 0:11 
yes, that would be nice. I think the best way is, to use a prefix (all doors with prefix will close automatic)
Mexican Dave  [autor] 28 MAR 2015 a las 12:53 
I will take a look at having it ignore hangar doors, or putting some switch to ignore them. Il get an update up sometime around tomorrow evening.
Darth Biomech 28 MAR 2015 a las 12:10 
I gor a bug report: this script react to hangar doors too.
Λtom 27 MAR 2015 a las 22:24 
Love this script, simple and effective. Any way to exclude certain doors or types of doors? (i.e. personnel doors vs. hangar doors)
Darth Biomech 10 FEB 2015 a las 4:21 
Wonderful, thanks!
Mexican Dave  [autor] 19 ENE 2015 a las 2:14 
Well thats an easy fix :).

For future reference for yourself any anyone else who has a similar issue, when you add a door and the game automatically names it the same as another door that is already on your ship, just renaming the door wont fix the new door not closing. Once you have renamed the door, open up the programmable block code editor and press 'Rembmber & Exit', and the scripts list of doors will reset and all should be working fine.
CPT Haddock 18 ENE 2015 a las 13:14 
yeah, I had probably just named it the same thing as some other door
Mexican Dave  [autor] 17 ENE 2015 a las 18:01 
Glad you got it working. I wouldn't have been able to help much, i have uninstalled all of the mods i was using to check out the new stuff the devs have added (not played the game in about 6 months), so its currently untested. Providing any modded doors are the same 'type' as the default doors in the script engine, it should work fine.
CPT Haddock 17 ENE 2015 a las 9:36 
uhm, nvm. all of a sudden the modded doors decided to co-operate. thnx for a great script
CPT Haddock 17 ENE 2015 a las 9:32 
´Very nice script, sir. but im having trouble getting it to work with modded doors. And no, i do not know the first thing about scripting. but any help is appreciated.