Space Engineers

Space Engineers

Whip's Auto Door and Airlock Script
570 kommentarer
aTruckgril Beverly ✿ 15. maj kl. 23:22 
@blurrymetal53 Hey, I get where you're coming from. Adding new functionality can be a bit tricky when you're still learning, but it's great that you're diving into it.

For detecting when the airlock is open and turning the LCD on or off, here’s a basic approach you can follow:

Check the status of the airlock door. You’ll usually want to get its Status property and see if it’s DoorStatus.Open.

Use an if statement to detect if it’s open or closed.

Then toggle the LCD on or off using the ShowPublicTextOnScreen() or by enabling/disabling the surface.

Let me know if that helps at all :)
BlurryMetal53 14. maj kl. 20:27 
I'm trying to add functionality to the script to turn on/off an LCD when it detects the airlock open, but can't for the life of me figure it out as I have no real experience coding. Anyway you can give me some tips for it?
Commander_Idiot 1. mar. kl. 5:06 
Nvm, apologies for my stupid question. I didn't read far enough.
Commander_Idiot 1. mar. kl. 4:56 
Will this work on an airlock with three doors? One leading to the interior and two to the exterior? If it does work, is it just following the same steps with the names?
Elafis 7. nov. 2024 kl. 12:21 
it is possible make some update if ship is in atmosfer? outter door open immidiately without depressure becouse ouside is pressure? Or for double hangar door possibile open both doors together if both side is (de)pressure? Thank you a lot :)
NekoJess 6. nov. 2024 kl. 5:45 
[Rose]Noot Try checking the code again.
Adolf Rizzler 6. nov. 2024 kl. 3:13 
Im not sure what im doing wrong, I cant get the airlock part to work, I have two connected doors named [Garage] Airlock Exterior and [Garage] Airlock Interior, however the boths doors can be opened without the other being closed. Any suggestions?
Whiplash141  [ophavsmand] 22. okt. 2024 kl. 21:37 
This script finds every door not name tagged with "Ignore". It does not currently use groups.
PrinceSporus 22. okt. 2024 kl. 20:19 
Does it work with groups or do I need to rename each individual block?
Whiplash141  [ophavsmand] 28. sep. 2024 kl. 17:28 
Yep, set "Ignore all hangar doors" in the program block custom data to false
DjFrost 27. sep. 2024 kl. 18:10 
Does the auto close function work with Vanilla Hangar Doors, and if so, how do I get it to work, as I cannot figure it out lol
BCMortis 19. sep. 2024 kl. 20:14 
Can I make a small request? Either an option to (or a different script) that ONLY manages specific doors. For example, I use a lot of modded window shutters on my base, and with most auto door scripts, I end up having to manually go through and exclude dozens of shutters and interior doors I don't want the script to keep closing. Would be a lot more convenient if I could label only the doors I want the script to manage and everything else is excluded by default.
VGAstudent 18. aug. 2024 kl. 11:46 
(I could imagine a shortcut to keep the blastdoors from being affected by the close door command would be to shut the blast door blocks off, and turn them on followed with a close command to close them fast during a leak.)
VGAstudent 18. aug. 2024 kl. 11:32 
I'd love to see a Blast Door option you could trigger to close if a room became de-pressurized; Is there a run argument you can create to close blast doors when an room no longer pressurized condition is met on a vent? like "Blast Doors Close" and "Blast Doors Open"?
Gontarekt 16. aug. 2024 kl. 12:33 
Hm, I thought of that, but I prefer how this script handles it, with the changing from Blue to Blinking Red, it just looks so much cooler.
Whiplash141  [ophavsmand] 16. aug. 2024 kl. 12:31 
if you just want flashy lights when a door opens, i think the event controller might work
Gontarekt 16. aug. 2024 kl. 12:25 
Well bugger :wrongpig:
Whiplash141  [ophavsmand] 16. aug. 2024 kl. 12:20 
nope, sorry
Gontarekt 16. aug. 2024 kl. 9:14 
Frequently use this script, but is it possible to use the Airlock System Light + Sound Blocks without having it lock the doors (Blinking lights / alarm when any door of an airlock is open)? I used to use the airlock system frequently, but the locked doors do get a bit painful after a while.
Whiplash141  [ophavsmand] 14. juli 2024 kl. 15:17 
I do see one potential issue here: Your airlock doors are named in the pattern of "Sliding Hatch Door - Airlock Exterior". This means that the code detects the airlock prefix as "Sliding Hatch Door -". Anything before the airlock suffixes is treated as the name tag.
Whiplash141  [ophavsmand] 14. juli 2024 kl. 15:15 
I see no blocks on this ship with the name tag "... Airlock Light" or "... Airlock Sound". Is this the right blueprint?
Sean W. 14. juli 2024 kl. 13:05 
Whiplash141  [ophavsmand] 14. juli 2024 kl. 2:56 
Have a blueprint i can look at?
Sean W. 14. juli 2024 kl. 2:18 
Yes
Whiplash141  [ophavsmand] 14. juli 2024 kl. 0:52 
You need the prefix on those block names as well. Do you have the same airlock prefix on all the airlock doors, the light, and the sound block?
Sean W. 13. juli 2024 kl. 22:26 
Yes, I made sure to check all ownership. And I used the exact names in the script "Airlock Light" and "Airlock Sound" but it's still not working.
Whiplash141  [ophavsmand] 13. juli 2024 kl. 20:00 
give me an example of the names you are using. Also, have you checked ownership of all blocks?
Sean W. 13. juli 2024 kl. 13:26 
I use this script a lot. But there is something wrong when I try to use it for lights and sound blocks. For some reason, the script isn't recognizing the lights and sound blocks even when I name them exactly how the script tells me to.
Whiplash141  [ophavsmand] 31. maj 2024 kl. 16:31 
This script does not control airvents at all. It simply prevents you from spacing all of your oxygen out of a simple airlock. If you want to preserve air, simply set the airvent in your airlock to always depressurize.
DoPa 31. maj 2024 kl. 13:33 
Hi, it works quite well but one thing is missing. Before the airlock opens, the pressure in the airlock should decrease and when I'm in the airlock I should blow it in again so that oxygen isn't constantly lost.
Darth Porgus 3. feb. 2024 kl. 15:36 
Thanks for the response!
Deapri 2. feb. 2024 kl. 23:29 
@Darth Porgus Isy's script interprets the positioning of the doors and inherits behavior based on that with control in exclusions. I feel this script offers more overall control of the setup and effective application. More setup is required however it is my opinion this script better suits my uses.
Whiplash141  [ophavsmand] 2. feb. 2024 kl. 22:43 
This is 4 years older. Aside for that I have zero clue because I only use scripts I write.
Darth Porgus 2. feb. 2024 kl. 15:10 
How does this differ from isy's simple door script?
Deapri 19. jan. 2024 kl. 15:37 
Which I could edit a post, anyway, the setting is Ignore all hangar doors=true set it to false
Deapri 19. jan. 2024 kl. 15:36 
Hangar doors are excluded by default change the custom data on the programming block to enable them.
xtravince 13. jan. 2024 kl. 14:10 
hi, this script is great thank you very much :steamthumbsup: , but when I install a hangar door it doesn't work with it, it doesn't close and there is no custom data (I waited for the refresh time)
Bacon 30. sep. 2023 kl. 21:45 
Thank you very much :)
Whiplash141  [ophavsmand] 30. sep. 2023 kl. 21:23 
Of course, these scripts are here for you to use
Bacon 30. sep. 2023 kl. 20:47 
Can I use this script for a ship I'm currently building? I'm going to post the ship on the workshop and wanted to make sure you're good with it. :)
Whiplash141  [ophavsmand] 28. sep. 2023 kl. 5:23 
Ignorance is bliss, and it seems you have an abundance of both.

Your profile was a hilarious shrine of stupidity, but you privated it :'(
Slinkerdeer 27. sep. 2023 kl. 18:30 
Pfff hahahaha! sadder than I thought, knew you would also thank me for the points xD, enjoy the meaningless internet numbers
Slinkerdeer 27. sep. 2023 kl. 18:27 
Hahahah I knew when I made that typo you would point it out because you have literally nothing else to respond with
Whiplash141  [ophavsmand] 26. sep. 2023 kl. 5:34 
I'll label your chin with deez nutz. Also how'd you manage to misspell "auto"? The helmet must have slid over your eyes.

:missing: <- The contents of your mind represented by a texture (thanks for the free steam points, I'm enjoying them lol)
Slinkerdeer 26. sep. 2023 kl. 3:28 
Once again, its labelled "auto door", you said "hence title" when I asked about it not auo opening the doors. Lmao how stupid can you be
aTruckgril Beverly ✿ 25. sep. 2023 kl. 17:03 
@Slinkerdeer do you wear that helmet when you use the stove or something? I can see reading comprehension is beyond you
Firewarrior44 25. sep. 2023 kl. 16:56 
> This script will close any door once it has been fully open for over 3 seconds (10 seconds for hangar doors).

The first line of the description is really unclear, please fix. Also Does Is this weapon core compatible?
Whiplash141  [ophavsmand] 25. sep. 2023 kl. 16:55 
Also, here are some resources that you'll definitely find helpful: https://www.wikihow.com/Teach-Yourself-to-Read
Whiplash141  [ophavsmand] 25. sep. 2023 kl. 16:52 
:jarate: <- you irl
Slinkerdeer 25. sep. 2023 kl. 16:07 
Oh, and enjoy the jester