Space Engineers

Space Engineers

Phils_Easy_Airlocks
49 kommentarer
Joshua Norton 4. maj 2020 kl. 17:11 
this still works with the script-fix listed below.
Nines 3. jan. 2019 kl. 16:29 
This was my favourite airlock script, but now it doesn't work anymore :(
Code Digits 22. sep. 2018 kl. 16:54 
This is attaching to other doors that aren't part of the airlock groups
HLK 26. juli 2018 kl. 16:48 
Seems to be broken :steamsad:
Sgt Major Johnson 28. apr. 2018 kl. 22:25 
nvm im just dense:steamfacepalm:
Sgt Major Johnson 28. apr. 2018 kl. 22:24 
so your script broke and its rly annoying :steamsalty:
ApocTheWanderer 11. mar. 2018 kl. 11:29 
Crashes server for me not sure why...
ChozoSR388 11. feb. 2018 kl. 0:25 
Nevermind lol Apparently you can't have any spaces in the door naming. Tanking the spaces out did the trick.
ChozoSR388 11. feb. 2018 kl. 0:19 
@Nova_Hawk Followed the steps to the letter, It started out looking like it was going to work, "Checking :airlock_ 01a", "Checking :airlock_ 01b", then I hit the Timer Block (Slot 2 like you said), and I got, "0 Airlock(s) being monitored" It's literally just doing sod all...
Eris P 2. feb. 2018 kl. 20:18 
Nova_Hawk,
I replaced the lines in question with the replacement, and see no difference. what have I don't wrong? Help a rookie scripter?
Demon_Hawk 28. jan. 2018 kl. 22:35 
To anyone getting script issues still, follow these three easy steps.


1.) Replace with Sunborns script edit:

Line 69:
Was until now: if (pair[0].Open && !pair[1].Open {

Which needs to be replaced by:
if (pair[0].Status == DoorStatus.Open && pair[1].Status == DoorStatus.Closed){

Line 77:
Was until now: if (pair[1].Open && !pair[0].Open {

Which needs to be replaced by:
if (pair[1].Status == DoorStatus.Open && pair[0].Status == DoorStatus.Closed) {

Line 85:
Was until now: if (pair[0].Open && pair[1].Open {

Which needs to be replaced by:
if (pair[0].Status == DoorStatus.Open && pair[1].Status == DoorStatus.Open) {

2.) In the timer block, in Setup Actions, set Toolbar 1 to Timer block - Trigger now and Program Block - Run in Toolbar slot 2

3.) Make absolutely sure (just do this) select everything connected to the ship (Ctrl+A) and set ownership to you.
Killtoris mit dem roten Halsband 17. dec. 2017 kl. 10:47 
I just spent some time messing around with scripts and finally understood how doors work now. I couldn't find recent examples.
So instead of doorname.Open, you need doorname.Status
In an IF, you would check :
if(doorname.Status == Sandbox.ModAPI.Ingame.DoorStatus.Open)
Here you have the different statuses [bloc97.github.io], for a piston you would compare to PistonStatus.Retracted, etc
Svetressito 18. okt. 2017 kl. 7:57 
aww thats too bad :/ well thank you for awnsering anyway.
PH1L1P  [ophavsmand] 17. okt. 2017 kl. 14:42 
Sorry Diabase, I haven't had time recently! I actually started a job in software development a bit after I made my scripts for space engineers so lately I've been all programmed out in my off time. Maybe once the game is 100 percent complete I'll come back to it! It takes a lot of work to keep up with changes being made to the game, so once it is more stable I think I'll be taking another look at this and my diagnostics scripts.
Svetressito 17. okt. 2017 kl. 8:45 
it seams that the 'lMyDoor.Open' command is obsolete, are you still maintaining this mod and if so when may we expect an update?
I love this script and would hate to be without it :(
. 29. aug. 2017 kl. 15:16 
I'd like it if you would add a "maintenance mode" that opens all doors. Thank you if you do this in the future.
The_Bat_Daddy 19. mar. 2017 kl. 13:34 
I tried to do what Sunborn said, but that didn't work. Any chance PH1L1P could try fixing the script so it works again. I really enjoy using this one.
Pizza Pineapple 5. mar. 2017 kl. 9:56 
uhm i don't get it working whatever i do, yes is re-edited the code and stuff
wellen 8. feb. 2017 kl. 10:51 
Cheers, Sunborn.
TwitchingPsycho 8. feb. 2017 kl. 10:50 
Dude, nice! thanks a lot! I tried to fix it but oddly, i always got errors because i used "pair[0].status == open". Awesome!
Sunborn 8. feb. 2017 kl. 10:30 
Great script and video!

As already mentioned the script now throws a warning. I just had a look at the code and I think I fixed it (new DoorStatus enum).

If you want to manually apply the fix to make the script work again before it was updated by the author, modify the following three lines:

Line 69:
Was until now:
if (pair[0].Open && !pair[1].Open {
Which needs to be replaced by:
if (pair[0].Status == DoorStatus.Open && pair[1].Status == DoorStatus.Closed){

Line 77:
Was until now:
if (pair[1].Open && !pair[0].Open {
Which needs to be replaced by:
if (pair[1].Status == DoorStatus.Open && pair[0].Status == DoorStatus.Closed) {

Line 85:
Was until now:
if (pair[0].Open && pair[1].Open {
Which needs to be replaced by:
if (pair[0].Status == DoorStatus.Open && pair[1].Status == DoorStatus.Open) {

That's it, script should now be working again.
TwitchingPsycho 31. jan. 2017 kl. 13:52 
I think multi-grid works. But of course as -some call me Wellen- said, it now throws an error. But the multi-grid works. I placed the programmable block on the rotors small head and the closing and locking of the doors work on the large grid. Of course, now it wont open which i assume is because of the error. Hope you update this soon for further testing.
wellen 30. jan. 2017 kl. 5:42 
The update to DEV from the 26th means this throws errors about obsolete code ("MyDoor.Open is obsolete"). Hope you get around to updating this once those changes hit stable as it's such a fantastic and useful script to have.
TwitchingPsycho 20. jan. 2017 kl. 17:39 
Sure, i understand. Well, its amazing anyway. Thanks!
PH1L1P  [ophavsmand] 20. jan. 2017 kl. 17:33 
@theimmersion Well, actually I might have spoken too soon. I'm pretty sure that's the case but I might be wrong. I haven't done any multi-grid testing with programmable blocks. No plans to update in the near future but I'd like to rewrite the script to make it more versatile and easy to use in the future.
TwitchingPsycho 20. jan. 2017 kl. 17:21 
Oh, i thought it was possible by default. I was always wondering, how for instance the automatic lcd 2 prog.block could be put on small grid piston head and show the info on all the large grid monitors. I guess reading and displaying lcd info is much different than calling actions on blocks. Will you be updating to use that? I use rotors and small piston heads a lot to compress the prog.blocks and timers space requirements for all the scripts. :)
PH1L1P  [ophavsmand] 20. jan. 2017 kl. 17:12 
@theimmersion Space engineers only started supporting multi-grid access recently so this script will have to be rewritten to utilize that functionality.
TwitchingPsycho 20. jan. 2017 kl. 4:10 
Im using the programmable block and timer on a rotor with small head to conserve room and it doesnt recognize the doors. I named them airlock_1a and airlock_1b. Nothing happenes. Does it work on different grids or only one one?
Silva 17. jan. 2017 kl. 8:06 
Great script and explanation.
That dramatic video though XD
space_artist_4real 31. dec. 2016 kl. 17:48 
[Epicness intensifies]

I definitively subt
Lathy...or is it 22. nov. 2016 kl. 10:41 
This is a pretty cool script, but there's one problem - every time you exit and reenter the world, it forgets about the airlocks it found and assumes it is monitoring no airlocks. Same if you copy-paste a ship with this running on it; the copy claims to be running no airlocks.

One way to fix this would be to have an IsInitialized boolean outside the main loop - if !IsInitialized, check for airlocks, then set IsInitialized to true. You could also store airlock block names in an LCD and look them up again, or you could try to fathom the save/load code for programmable blocks (more power to you).

Again, nice script overall - gets the job done and negates the need for complex sensor/timer-block/vent malarky, which is always good.
Tug 13. nov. 2016 kl. 13:04 
I subscribed, how do I get the code now? thanks.
PH1L1P  [ophavsmand] 22. sep. 2016 kl. 14:11 
@OLOski Sorry about that! When I made the video the timer was doing some other unrelated stuff. All you need is the timer to "trigger now" itself, and also to run the programming block with no arguments.

So just two actions! The other two were for another program I had been working on.
OLO 21. sep. 2016 kl. 2:58 
Everythink is simple and clear except one point - what action should be setup in timer block
I see in video 4 actions but its not clear what specific action are they.
Thanks for reply
𝕷𝖎𝖓𝖌𝖗𝖆𝖍 20. sep. 2016 kl. 18:24 
Edit: Great script. Shame that I have that issue but it isn't your fault. Great script and a life saver when your friends in the server are to stupid to use the airlock with 2 buttons you made (auto doors and pressurization before entry, just pressurize and depressurize when inside the room)
PH1L1P  [ophavsmand] 20. sep. 2016 kl. 16:24 
@⎛⎝TotalLegitREMIX⎠⎞ That is strange. Is your timer triggering itself constantly? It should be.

How much time passes between when the door turns off and then turns on again? With stock settings it should be about as fast as it is in the video.
NauticalSailor 2. sep. 2016 kl. 15:11 
I finally found this script! The xoc proof airlock!
I will be using this for my future airlocks :)
Harlock 22. aug. 2016 kl. 18:17 
Must download... voice compels me to
PH1L1P  [ophavsmand] 19. juli 2016 kl. 16:14 
@Hiramas Good idea! That'd be pretty cool.
Capybellie 18. juli 2016 kl. 8:35 
Hey. I love your script, it is nice and simple and easy.
But then, I am right away going to make suggestions to make it more complicated XD
Could there be an option to use an override function? For example, have a Button that opens both sides of the Airlock (e.g. when docked), but we then could also put the trigger into an airvent that activates/deactivates the override when it is at 100% / leaking.
Mallchad 9. juli 2016 kl. 2:29 
One thing that I'm not sure about is if there is a little air that gets trapped in the airlock block and is release when you open it up. Just wondering if anybody knows
TenTech 9. juli 2016 kl. 1:55 
Looks handy for vanilla builds. Video was surprisingly entertaining.
dseszu 6. juli 2016 kl. 11:16 
How could i resist downloading this mod after watching the video? :D
DeAnti 6. juli 2016 kl. 0:08 
voice acting 10/10
Ramalis 4. juli 2016 kl. 20:04 
voice over man....can i hire you :0
Mr. Bibbles 4. juli 2016 kl. 12:01 
I've never imagined airlocks sounding so damn epic.
Shinra Tensei 3. juli 2016 kl. 10:01 
LOL that commentary was wonderful XD. You need to do TV commercials lol.
PH1L1P  [ophavsmand] 3. juli 2016 kl. 6:26 
@Sebastitan No, that's me!
Ludwichs 3. juli 2016 kl. 5:20 
LOL that voice acting! How did you do that? Did you hire someone? Is that a program? :steamhappy: