Space Engineers Programming 101 – Airlock Script – Part 2

Share it with your friends Like

Thanks! Share it with your friends!


Welcome to a new programming series on Space Engineers! In these videos I hope to explain & learn how to create some cool scripts using the programmable block in Space Engineers, I hope you all enjoy it! 🙂

Steam Script Download Links:
Power Display Script:

You can get the game on from its website below or from Steam
Space Engineers Website:

Sleepless Knights Studios group on Steam:

What’s your favorite series Google Form:

Space Engineers is property of Keen Software House


John Keyworth says:

"for(int i = 0; i > 0; )" will never execute what's in it because i > 0 is always false. You wanted "for(int i = 0; i < 1; )" but then you'd get the "script to complicated" error you had with the while loop. If you want to wait you'll need to set up a simple state machine.
A couple of rules of thumb on errors: If you get an error about parentheses in an off place you've missed one out 'somewhere' in your program. Errors saying you provided a method instead of something else mean you missed a () from the end of a function.
Consider using visual studio for editing your code ( it's so much nicer and you can paste your code in game. Not sure how it'd interact with your recording software though.

DerSerafin says:

You are the cleanest coder i have seen so far in SE.

gavin harison says:

You probably fixed it by now but maybe sensors could work instead of buttons making it a more seamless experience 

Ixam97 says:

As far as I know programmable blocks can only run for a specific time (not sure if it was one tick or one second), so you wont get arround using timers. But actually its not that hard, I got a working airlock with just a few lines of script and two timer blocks, it even locks one of the doors, so it cannot be opened by accident, and some indicator lights. Let me know if you would like to See my solution ;)

krulty says:

Hey, found this you might be interested in, might even want to incorporate part of it into this airlock system!? someone has coded a system that senses where and what room is pressurised or depressurised

Zoid Industries says:

On a ship I built that uses my solution to the full tank problem I counted the depressurization time for the hanger bay and came out with. 9-10 seconds to depressurize completely.

Zoid Industries says:

I found the same issue when I started piddling with the oxygen blocks. The only solution I found was to have a tank seperated from the generator.

krulty says:

You can add delays to coding. I had a quick look on google and there are a few forums and vids. Its all stuff I don't understand but it get the fact it can be done across. Its all this DateTime, QueuedAction, null, Increase Delay, AddSeconds, Random rng, public Func<int>Action, void Main and other coding terms that mean jack to me as of yet lol

Mad Mike says:

Machinery like refineries, cargo containers and the vents are not airtight (from what I read).
Awesome code work by the way dude. I know way too little about code. ;-)

Write a comment