Barotrauma

Barotrauma

View Stats:
Mr. Kain Jan 4, 2021 @ 1:30am
Wiring ballast pum to a button
I'm trying to get my head around wiring. I made a simple experiment. I connected a button to a balast pump. I connected the signal_out in the button to the set_state of the pump. I detached the set_tragetlevel of the pums so the sole input is the button, the pump has the power_in cable attached. Nothing happens when I click the button. What am I missing?
< >
Showing 1-4 of 4 comments
Timoteo Jan 4, 2021 @ 3:40am 
In the submarine editor, use the "e" (keyboard) button on the pump to set its default. This will dictate whether it pumps in or out. (It's probably idling in the middle, so it's working hard a neutral.)
GreySciTe Jan 4, 2021 @ 4:09am 
Although it's not your problem here you also should connect your button with toggle_state. At least if you want your pump to be switched off again by the button. Switches usually go into set_state.

In addition to what Timoteo said you can also check and adjust the pumping setting manually while playing/testing. Just click on the pump and adjust the slider.
Last edited by GreySciTe; Jan 4, 2021 @ 4:15am
crow36 Jan 4, 2021 @ 2:39pm 
Originally posted by Kulik242:
I'm trying to get my head around wiring. I made a simple experiment. I connected a button to a balast pump. I connected the signal_out in the button to the set_state of the pump. I detached the set_tragetlevel of the pums so the sole input is the button, the pump has the power_in cable attached. Nothing happens when I click the button. What am I missing?


did you figure it out? i would like to have an emergency ballast pump off switch in case of a flora infestation
Deceptive Pastry Jan 4, 2021 @ 3:47pm 
The problem is that buttons are not toggles (Unless you set them to be but that can only be done in the sub editor). They just send out a single pulse of a 1 signal when you press them. So you're just sending a 1 to set_state which is "on". Buttons are mainly used for toggle_state signals. You want to use a switch or a lever, these are both toggles - they send a constant 0 or 1 signal when off/on.

If you're wanting to turn pumps off for ballast flora, what you'd need to do is place a relay in between the junction box and ballast pump wired to power. Then place a switch/lever and wire it to set_state of the relay. You can't just set_state off the ballast pump, if you attack ballast flora it still can override that. But it can't turn a relay back on and it can't do anything on the pump without power. Only problem is this might catch fire depending on how much power the pumps use. I placed one with the sub editor where you can change max output, overvoltage, and fire probability values.
Last edited by Deceptive Pastry; Jan 4, 2021 @ 3:49pm
< >
Showing 1-4 of 4 comments
Per page: 1530 50

Date Posted: Jan 4, 2021 @ 1:30am
Posts: 4