Space Engineers

Space Engineers

Airlock Controller
17 Comments
mazrados 1 Jan, 2021 @ 11:50am 
Is it possible to use withought oxygen tanks?
I need something simple, 2 sliding doors next to each other.

All this type scripts I've found don't enable to set names for doors to handle and use all of them.
And I need just particular doors to be handled by script.
MrFox 12 Feb, 2019 @ 7:35am 
=D
DFA.Jaken Veina  [author] 11 Feb, 2019 @ 7:52pm 
In progress.
MrFox 11 Feb, 2019 @ 12:48pm 
Needs update not working
Aether 15 Dec, 2017 @ 8:13pm 
I didn't try it, but I've heard that somes things concerning script or something else has very changed so...
DFA.Jaken Veina  [author] 15 Dec, 2017 @ 7:06pm 
Quite possibly. Almost two years since the last one. Are you having trouble with it?
Aether 9 Dec, 2017 @ 4:53pm 
Does it need to be updated?
DFA.Jaken Veina  [author] 21 Feb, 2017 @ 4:51pm 
The way it's setup, it wouldn't make sense. When an airlock is "pressurized" it only stays that way for a few seconds, then automatically closes all interior doors and depressurizes. Basically, it automatically toggles.
De/Code 21 Feb, 2017 @ 12:44pm 
Is there a "Toggle" command?
KingdomBragg 14 Aug, 2016 @ 1:28am 
Thanks for the response, I should have been more descriptive of the setup. The ship has a small internal space containing a single door, oxy generators, oxy tanks and vents. I've realised what I was hoping for isn't in the controls i.e. disable the auto depressurization keeping the inside pressurized and running the script with a depressurize argument to exit the ship.
DFA.Jaken Veina  [author] 13 Aug, 2016 @ 10:23pm 
If I'm understanding you correctly, you basically want the entire ship to be an airlock.

You could do this with the script, as-is, only if you don't have an Oxygen source on the ship. If you just have large Oxygen tanks that you refill when you dock at a station or larger ship, then just name all the stuff in your ship as described above and you should be good.

If your ship has its own Oxygen Generator, you would need to have Oxygen Tanks and Vents, separate from the Generator, to store Oxygen while the door is open, and you'd have to modify the script slightly to shut off the Oxygen supply vent while depressurizing.
KingdomBragg 13 Aug, 2016 @ 5:51am 
For a small ship with a single exterior door, is it possible to set up your script to keep the ship pressurized until pressing a button to open the exterior door?
KingdomBragg 9 Aug, 2016 @ 10:02am 
Very nice, subbed and upvoted
Krougal 7 Feb, 2016 @ 1:35pm 
Also since I'm lazy I'd like the outer door to open when depressurization cycle is done on my way out , I have it working kinda, sensor is just inside inner door and reaches just a little ways into the airlock. Detect pressurizes, undetect opens door. So I diddybop up to inside door, it pressurizes, it opens, I go in and stand just inside the door. After normal depressurize cycle kicks in, I can walk towards exterior door and it opens. (this is all stuff I added since the worldfile I sent you).

I think it could be streamlined by having sensor tagged airlock name, and having the script polling (since it runs all the time anyway) the sensor. So if it detects someone it pressurizes, if not it depressurizes. Since the state only changes when you go by it, it could open the exterior door when done. Then the normal run would close it again after the default timeout.
Krougal 7 Feb, 2016 @ 1:35pm 
So I ran it without tagging any tanks airlock and it still appears to work properly, but then I have tiny airlocks so it might not be noticeable. I think you have code that if the tank is full it just unlocks the door right? I guess it doesn't matter since you aren't opening the exterior door.

Well, and I'm assuming I can issue run from another PB (haven't had a chance to try) but like for the Ulysses-Vagabond & Ulysses-WURM airlocks, I'd like to pass enable/disable commands when unmerged/merged, so it would be good to turn the sensor on/off as well.
DFA.Jaken Veina  [author] 7 Feb, 2016 @ 12:57pm 
Soundblock support sounds reasonable. I'll have to actually go learn how soundblocks work.

Separate light states for each airlock state also sounds reasonable. I'm surprised I didn't consider adding that already for the published version, even though I don't use it.

I'm..... not sure what you're asking, regarding the use of tanks.....

Sensor support would also be fairly easy to add, but I'm not sure if that's really necessary. I've never used sensors on anything myself. Are there any issues in particular you're having?

What'd be really nice, especially if I could do it for buttons as well, is to have the script automatically assign the correct button and sensor actions, just by being tagged, unless an action already exists. I'm not sure if that's something an ingame script can modify.
Krougal 7 Feb, 2016 @ 12:46pm 
Working like a champ since you helped me setup. I've even got it triggered off sensors cause button panels are not for lazy people.

Couple minor features it could use:
Options for play soundblock on different actions
Seperate light blink states for press/depress - i.e. I'd like green when pressurizing and red when depressurizing.

Haven't seen any ill effects running without tagged tanks (but I been testing in creative still) but I suspect it might mess with the override to wait for clear and just open the doors prematurely (on larger airlocks than I use anyway). Option for single tank, or just to check that there is space in any tank available woudl be good.

Sensor support, so enable/disable/lockdown/release commands can turn airlock sensors on/off as appropriate. Possibly detect and run press/dep off sensor state detection if exists?