Barotrauma

Barotrauma

View Stats:
Some_William May 8, 2022 @ 12:11pm
Making terminal controls?
Howdy,
So I for some reason have the urge to allow terminals to use commands to Enable certain things,
I.e lights, pump power or whatever, just for the lols.
How do I get that done? I do know the Humpback uses something similar for the Batteries.
< >
Showing 1-4 of 4 comments
FourGreenFields May 8, 2022 @ 12:38pm 
With a lot of wiring. Signal check and/or regEx components in particular, to read your inputs.
Some_William May 8, 2022 @ 12:54pm 
Originally posted by FourGreenFields:
With a lot of wiring. Signal check and/or regEx components in particular, to read your inputs.
regEx Checks the actual input, right?
Buggy Boy May 8, 2022 @ 1:31pm 
The Humpback simply sends the entered text directly to batteries for the charge rate, no matter what's entered; the batteries only understand numbers from 0 - 100 so anything else is rejected. Two signal check components also listen for 'on' or 'off' text entries which operates a relay.

If you want to direct signals to specific devices then use RegEx to capture the value, so it would send that value to e.g. the pumps if you type 'pumps 50' if you want to set the pump speed. If you just want to turn the pumps off then signal check for 'pump off' with 0 output to a relay set_state would be a better choice. RegEx requires you to understand regular expressions so do an internet search for that.

I made use of this kind of thing in my Dallas and Humpback subs, feel free to grab them from the Workshop and have a look at the RegEx stuff at the rear of the sub.
Last edited by Buggy Boy; May 8, 2022 @ 1:34pm
Dr.™ Jan 19, 2024 @ 12:30pm 
So I set up a RegEX and a Relay for each set of items I want to control. Initially I had two sets, one was looking for "Battery" and the other was looking for "Weapon" (supercapacitors). The RegEX components receive a signal from the console and the indicated one sends a "1" state to a relay, which then allows the next value to go to the directed device(s).
To set super conductors to 75, the user would need to enter:
>Weapon
>75

Edit: I'm just now noticing I'm about a year and a half late to this conversation lol
Last edited by Dr.™; Jan 19, 2024 @ 12:32pm
< >
Showing 1-4 of 4 comments
Per page: 1530 50

Date Posted: May 8, 2022 @ 12:11pm
Posts: 4