Barotrauma

Barotrauma

View Stats:
How do I get a door to open when it detects water?
I want my ballast pump button hatch to open when it detects water and the same with a motion sensor hatch (so it will drain faster than a small door idk what it is called)
Same thing gut with a motion sensor door
< >
Showing 1-12 of 12 comments
KittyLava Apr 12, 2023 @ 6:59am 
Probably with having the signal out of the device wired into the door/hatch's set state. Output on the water detector should be set to 1, with the false signal being left blank so that when there's no water it'll deactivate without getting the hatch stuck. So for example when it detects no water, its not locked open and you can manually operate it again.

I've wired up a modular system on a few submarines before, where all I had to do was flip a switch to begin the routing process to drain the water in most places, all the way down from most places into one of the submarines sets of pumps as we had the means to handle pretty heavy leaks quickly. Course I'd have it in the captain's navigation with an override maintenance mode switch in engineering.

The motion sensor you'll probably need to figure out a good placement and program it somewhat for distance to what type, but once set you can have it set to open and close. This one you don't need to worry about the false signal being blank as you can set it up to be 0; assuming you have it for players/bot humans walking around, so when it detects motion there it lets them pass, but without it shuts the door timely.
Rhapsody Apr 12, 2023 @ 8:43am 
Having ballast hatches open automatically under any conditions is also a good way to flood the entire sub, since they are often found at the bottom of the sub and are thus prone to breaches due to attacks or collisions from below. With a bunch of wiring and components you could probably make some system with manual overrides and stuff but I wouldn't trust bots to be able to handle it and overall it's better to rely on ducts since you don't need to pass through those. Of course, some vanilla subs like Humpback rely on hatches, but you can always steer clear (pun not intended) from those subs.
Mountain King Apr 12, 2023 @ 9:32am 
Originally posted by Rhapsody:
Having ballast hatches open automatically under any conditions is also a good way to flood the entire sub, since they are often found at the bottom of the sub and are thus prone to breaches due to attacks or collisions from below. With a bunch of wiring and components you could probably make some system with manual overrides and stuff but I wouldn't trust bots to be able to handle it and overall it's better to rely on ducts since you don't need to pass through those. Of course, some vanilla subs like Humpback rely on hatches, but you can always steer clear (pun not intended) from those subs.

It only takes one extra water detector to turn a drain into something that more or less functions as a check valve.
Rhapsody Apr 12, 2023 @ 9:48am 
Yeah? So if we look at Humpback's engine room as an example, how do you wire the ballast hatch with just two water detectors so that the mechanic can get in and out to do their job even if both rooms have water in them?
Mountain King Apr 12, 2023 @ 10:48am 
Originally posted by Rhapsody:
Yeah? So if we look at Humpback's engine room as an example, how do you wire the ballast hatch with just two water detectors so that the mechanic can get in and out to do their job even if both rooms have water in them?

To allow normal access would require an override, but that's just two more components. Ducts were nice when the flow rate on them was much higher but I can see why people would want to use hatches now.
Rhapsody Apr 12, 2023 @ 12:50pm 
But do bots understand how to use an override for ballast hatch? That's the problem I have lol. I prefer doors with buttons instead of separate buttons so haven't really messed around with those.
Originally posted by XHU 524 - OFSET 5:
I want my ballast pump button hatch to open when it detects water and the same with a motion sensor hatch (so it will drain faster than a small door idk what it is called)
Same thing gut with a motion sensor door

Depends on what your aim is. Most motion sensors acquirable in game do not register the presence of the target character classes within their range unless those characters move in some way, making them a little annoying to deal with when you want to build a circuit that is active when someone is (not)present, as if they stop moving the motion detector won't detect them.

If all you want is the ballast to open when water is detected in the room above, place a water detector at foot level in the room above and set 'output' to 1 and 'false output' to null, meaning delete the '0' and leave the false output field blank. Wire the signal_out of that detector to the hatch 'set_state' pin of every ballast hatch in that room and those ballasts will be forced open when there is water in the above room and will default to normal behavior when water is not detected.

This isn't a great way to go about it, but it's 1 detector and 1 wire per hatch (assuming you don't already have some other circuit control on the hatch) so it's cheap and easy.
Insano-Man Apr 12, 2023 @ 4:02pm 
Originally posted by Rhapsody:
But do bots understand how to use an override for ballast hatch? That's the problem I have lol. I prefer doors with buttons instead of separate buttons so haven't really messed around with those.
Bots can understand separate buttons, but, in my experience, they don't understand override levers.

Personally, I install override levers on ballast hatches for that exact reason. Bots usually shut doors behind them, which makes it a nuisance when something other than the ballast is leaking. It's actually of particular note on the Humpback, since the command room is just as liable to leak as the ballast underneath it. If ever a ballast starts leaking, and we're not in a good place to have it fixed, I just lock it shut to keep the water contained.
Nattie98 Jan 12, 2024 @ 7:51am 
You use a water detector and a door of your choice and a signal component with a relay component. Place the water detector where you want to have water be detected.

Door State Out -> Signal Check component's Signal in
Signal Check Component's Signal out -> Relay Components Set State
Water Detector % -> Relay Component Signal In 1
Relay Component Signal Out 1 -> To Door Toggle State

This took me hours upon hours to figure out but I did it (-_-)
The Flaming Pike Jan 12, 2024 @ 10:51am 
Welp, had I seen this thread back then, I would've given you the solution. Here is a submarine I made with this functionality. Whenever water is detected, a series of hatches open and most of the water goes down to the ballasts. Feel free to copy the hatch/water detector wiring for your own sub:

https://steamcommunity.com/sharedfiles/filedetails/?id=2293153015
DECAFBAD Jan 13, 2024 @ 2:25am 
How do you get the door to open when it detects water?

Just don't close it!
Koytar Jan 13, 2024 @ 6:51am 
Originally posted by DECAFBAD:
How do you get the door to open when it detects water?

Just don't close it!

Closing automated doors: hold my :grog:
< >
Showing 1-12 of 12 comments
Per page: 1530 50

Date Posted: Apr 12, 2023 @ 6:40am
Posts: 12