Space Engineers

Space Engineers

Automatic Door Close
44 則留言
Valykino 2023 年 8 月 15 日 上午 8:22 
i can't get it to work i have put "AutoClose" in every name but it still doesnt work
rafikiman 2021 年 4 月 29 日 下午 8: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 2021 年 3 月 25 日 上午 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 2020 年 12 月 21 日 上午 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 2020 年 12 月 21 日 上午 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 2020 年 7 月 27 日 上午 5:01 
when i try compile it gives me an error
Kakskjiv 2020 年 6 月 15 日 下午 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 2020 年 4 月 1 日 上午 3:44 
This works perfect. Always wanted a proper 'all' door closing script.
Nice work.
br8den 2020 年 2 月 15 日 下午 2: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 2019 年 4 月 13 日 下午 1:15 
Thanks for the fix, @Risa Koizumi !
dark_mift 2018 年 7 月 23 日 上午 9:08 
Script is no longer viable
classicpark 2018 年 5 月 2 日 上午 10:43 
Why the creator is not updating this script its a cool script
Risa Koizumi 2018 年 1 月 1 日 上午 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 2017 年 10 月 3 日 下午 4: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 2017 年 5 月 13 日 下午 10: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 2017 年 2 月 27 日 下午 8:33 
so what, this doesnt work anymore?
Kaiash 2017 年 2 月 13 日 上午 8:17 
it tells me iMydoor.Open is Obsolete
DMMWolf 2017 年 2 月 13 日 上午 8:15 
was just going to comment about obsolete commands but someone beat me to it
HachiiCatt 2017 年 2 月 6 日 下午 5:40 
getting some obsolete errors
{H.K.}Warlama 2016 年 12 月 26 日 下午 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 2016 年 9 月 10 日 下午 5: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 2016 年 9 月 10 日 下午 5: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 2016 年 8 月 21 日 下午 8: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 2016 年 8 月 19 日 下午 6: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 2016 年 8 月 16 日 下午 10:56 
One of my doors wont close Automatically, it is only one though. The line is in the name and everything.
Dancing Bastard 2016 年 6 月 30 日 下午 3: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™⎝ 2016 年 5 月 11 日 上午 8:14 
great script ;)
Cherubiel 2016 年 2 月 10 日 下午 2:15 
Doesn't close doors >_<
Maybe its the sliding doors I'm using this for?
Majky 2015 年 11 月 3 日 上午 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 2015 年 7 月 16 日 下午 6: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 2015 年 7 月 1 日 上午 11:28 
NICE !!!
Mexican Dave  [作者] 2015 年 4 月 5 日 上午 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 2015 年 4 月 3 日 下午 8: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 2015 年 3 月 29 日 上午 12: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  [作者] 2015 年 3 月 28 日 下午 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 2015 年 3 月 28 日 下午 12:10 
I gor a bug report: this script react to hangar doors too.
Λtom 2015 年 3 月 27 日 下午 10: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 2015 年 2 月 10 日 上午 4:21 
Wonderful, thanks!
Mexican Dave  [作者] 2015 年 1 月 19 日 上午 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 2015 年 1 月 18 日 下午 1:14 
yeah, I had probably just named it the same thing as some other door
Mexican Dave  [作者] 2015 年 1 月 17 日 下午 6: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 2015 年 1 月 17 日 上午 9:36 
uhm, nvm. all of a sudden the modded doors decided to co-operate. thnx for a great script
CPT Haddock 2015 年 1 月 17 日 上午 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.