Space Engineers

Space Engineers

Not enough ratings
Master Airlock Control
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
4.541 KB
24 Apr, 2017 @ 6:44pm
2 May, 2017 @ 3:20pm
3 Change Notes ( view )

Subscribe to download
Master Airlock Control

Description
Simplify the creation of airlocks for your ships or stations.

A script I made to manage all of my airlocks in the game. What it does can actually be done by simply using actions but it makes it easier if you have lots of airlocks on a big station and you don't want to configure each ones.

Your world needs to have airtightness enabled of course.

The script needs to be run continuously. You can either use a timer to do that or my mod Space Data Center.
I recommend using my other mod Space Data Center to manage that script. It runs the script continuously without needing to add a timer.

If you want to use a timer. You need to add the following action in the following order to the timer
- Timer : Trigger Now
- Timer : Start
- Programmable Block : Run (Put nothing in the argument)

How to use
The script controls all of the components needed to create an airlock.
- Doors connected to the inside and outside of the ship
- Airvent in the airlock to pressurize and depressurize
- Sensors to detect if a player is in the airlock or neer one of the doors

The script can manage multiple different airlocks on the same grid at the same time. It also works with groups of doors, sensors and airvent.

Here's how to setup a basic airlock with 2 doors, 1 airvent and 1 sensor.

The Airlock needs to be an enclosed space with 2 doors on each extremity. The airlock needs to have an airvent connected to it and a sensor between the 2 doors. The sensor is to detect astronauts (or ships).

On a small airlock you want to set the detection range of the sensor to 1m for each direction. On a bigger airlock you'd want to adjust that to your need. Usually you want the sensor to have a range that is only inside the airlock.

Choose an identifier for the airlock
Your airlock needs to have a unique identifier that will be used in the commands. It can be something like MAINDECK, HANGAR, etc.

Change the name of the airlock's components
The name of each components needs to contains the following text. Replace ID by the identifier of your airlock
(MAINDECK, HANGAR, etc.)

All Naming follow this template
ID.BLOCK.TYPE

Doors connected to the inside
ID.DOOR.INSIDE

Doors connected to the outside
ID.DOOR.OUTSIDE

Airvents in the airlock
ID.AIRVENT.AIRLOCK

Sensors in the airlock (In a small airlock you need to set those to detect only 1 block away from it)
ID.SENSOR.AIRLOCK

Use buttons or sensors to send the following commands to the script

Will close the outside door, pressurize the airlock and open the inside door
ID.OPEN.INSIDE

Will close the inside door, depressurize the airlock and open the outside door
ID.OPEN.OUTSIDE

If the room is pressurize it will do ID.OPEN.OUTSIDE else if the room is depressurize it will do ID.OPEN.INSIDE
ID.SWITCH

Will do ID.OPEN.OUTSIDE then wait for the astronaut to enter the airlock. When the astronaut is detected it will do ID.OPEN.INSIDE
ID.GO.INSIDE

Will do ID.OPEN.INSIDE then wait for the astronaut to enter the airlock. When the astronaut is detected it will do ID.OPEN.OUTSIDE
ID.GO.OUTSIDE

Will cancel the current operation for ID
ID.CANCEL

Will reset all of the grid's airlocks
RESET

Will display the list of those commands inside the programmable block
HELP

The system will turn off the doors to prevent accidentally opening them when you shouldn't

Advance Airlock Design
To have a fully automatic airlock system you can do the following
- Add a sensor outside the DOOR.OUTSIDE that triggers the script with the command ID.OPEN.OUTSIDE
- Add a sensor inside the DOOR.INSIDE that triggers the script with the command ID.OPEN.INSIDE
- Go in the control panel of the sensor inside the airlock and add a trigger with the following command ID.SWITCH

Bug/Suggestions
Feel free to comment if you found a bug or have a suggestion.
7 Comments
MyTEO 6 Jun, 2017 @ 6:33pm 
@mooviies Any idea when you'll have the decompression fix ready? In creative mode and my outer door won't open
mooviies  [author] 3 Jun, 2017 @ 5:49am 
@SonicBlue22 The sensor in the airlock needs to be there for the command ID.GO.OUTSIDE and ID.GO.INSIDE which is an automatic process of opening the door waiting for an astronaut, closing the door, etc. But if you don't use those you don't have to put the sensor down and you can only use buttons.
mooviies  [author] 3 Jun, 2017 @ 5:47am 
@SonicBlue22 Oh, good catch, I'll add a check to let it open the door if the tanks are full
SonicBlue22 31 May, 2017 @ 5:35pm 
[bug] So I set up an airlock with a sensor, and if you don't have any more room in oxygen tanks (like in creative), the airlock can't depressurize so it never opens.
SonicBlue22 31 May, 2017 @ 5:09pm 
Is there a way to use this without sensors, just buttons?
mooviies  [author] 30 May, 2017 @ 3:50pm 
Sure I could add a light indicator. I'll look into that when I have time :)
Gotschy 26 May, 2017 @ 12:35pm 
Finally found a Airlock script that runs :D Thank you! It s working totally fine and after installing the first airlock it doesnt sound complicated any more^^ Really quite easy.

Is it possible to add LCD outputs and/or light indicators?