Barotrauma

Barotrauma

View Stats:
newdesertfox Nov 28, 2023 @ 2:12pm
Is there a way to wire blinking lights that are able to also be shutoff? (not in editor)
Ive been trying to wire red blinking lights to go off when approaching crush depth from latchers to alert crew to done suits in campaign. I have all the depth alarms wiring figured out, but the only way I can get it to blink and be shut off when not in danger is using a relay and toggle state on lights. It does work but Id prefer a much faster blinking, I can never get an oscillator that I can set the frequency of, but will also leave the light off when above crush depth to work right. The lights always seem to revert to on state when the signal from the greater then is off. I feel like I should use a relay with the power going into a set state, but somehow the oscillator is suppose to effect the state out power but can't figure out how to do that. Is it possible or just not
< >
Showing 1-9 of 9 comments
What do you want to happen exactly? When you approach crush depth, red lights start blinking?
newdesertfox Nov 28, 2023 @ 4:30pm 
Yes, though without the red light staying on when above crush depth.
Currently have Navs Y pos wired to a greater then with a memory with depth. Type in your crush depth and then run the greater thans output to lights and their toggle state. But it leaves the lights perm on so you get stuck with rooms flooded in red light which would be nicer if they just shut off and could use an oscillator on square and higher frequency then 1
Should be pretty simple then, your memory component with crush depth entered sends its output to signal two of a greater component, and nav_y_pos from the nav console sends its output to signal one of the greater component, like you said. If depth > memSubCrushDepth, output 1, false output 0.

Second, you'll want an oscillator that sends a constant signal and alternates between 0 and 1 (square setting I think? I've have to refresh my memory on that) and does so at a frequency of 2 maybe.

Then you just wire up an AND component, signal one being the greater comonent's output, signal two being the oscillator output, and the AND output goes to the light's set_state. Output should be set to 1, and false output 0.

If the sub's nav_y_pos is greater than the value of the memory component, the greater component outputs 1, otherwise it outputs 0. If it's 0, the AND tests false regardless of the ocsillator signal.

The oscillator is always sending out either a 0 or a 1, at a rate you specify (higher number is a faster cycle rate). If it's a 0, AND tests false and the light goes out regardless of the greater component signal. If its a 1, AND tests true if the greater component also outputs 1, which it only does, in theory, if you're below crush depth. Mem, greater, oscillator, light component, and you're good to go I guess.
newdesertfox Nov 28, 2023 @ 8:38pm 
Worked great, thanks a bunch! that AND component was the missing link. lost some crew to being to deep fighting a latcher, plan is to set memory depth to be about 100ish meters before crush so people get a heads up this time for dive suits an in sub expedition swim before hull starts cracking lol
Sianae Nov 29, 2023 @ 12:39am 
I feel like amidst the chaos of a sinking vessel, your crewmates might miss the blinking lights. For extra coolness, you could additionally wire it up with a Wifi Component to broadcast a message over radio eg. "APPROACHING CRUSH DEPTH".

Alarm is also an option but many vanilla ships have default flood/fire/reactor wiring to alarms so its not very distinguishable amongst other alarms buzzing.
newdesertfox Nov 29, 2023 @ 7:15am 
I do also have it wired to emergency sirens to add to the immersion, but yeah its challenging with all the alarms sounding the same. I actually just downloaded a alarm mod that has 40 other alarms to make whats happening easier to tell. What I'd love to do is figure out how to mod it so could make alarms that did the Cyclops from subnautica voicelines for crush depth instead of a buzzer
Buggy Boy Nov 29, 2023 @ 10:07am 
Originally posted by newdesertfox:
I do also have it wired to emergency sirens to add to the immersion, but yeah its challenging with all the alarms sounding the same. I actually just downloaded a alarm mod that has 40 other alarms to make whats happening easier to tell. What I'd love to do is figure out how to mod it so could make alarms that did the Cyclops from subnautica voicelines for crush depth instead of a buzzer

Just replace the appropriate audio file from that alarms mod with the voice file from SN, should work without any modification, assuming each alarm sound uses a different audio file. You should credit the original mod author if you post it to the Workshop though.
newdesertfox Nov 29, 2023 @ 12:08pm 
so basically take the mod, clone it, then re-voice every alarm with voicelines from SN? Im sure its incredibly easy and stupid simple for someone whos familiar with making mods pfft.
newdesertfox Nov 29, 2023 @ 6:23pm 
https://steamcommunity.com/sharedfiles/filedetails/?id=3100276833 This is the finished circuit, blue is depth data, green is crush data, red is alarm channels, and white is light power, orange is flashing. The bottom component with XOR sends an alarm out during the 100 meters before crush depth, and once crush depth is hit it deactivates the channel and the upper GREATER takes over and opens a 2nd channel to a different sounding alarm. And both sets feed into the AND which is turning the blinking hazard lights on
< >
Showing 1-9 of 9 comments
Per page: 1530 50

Date Posted: Nov 28, 2023 @ 2:12pm
Posts: 9