Barotrauma

Barotrauma

51 ratings
Automated turret Switching System
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
484.748 KB
Jun 18, 2019 @ 10:46am
1 Change Note ( view )

Subscribe to download
Automated turret Switching System

In 1 collection by Max
Max's Logic Collection
2 items
Description
Ever wanted to link up multiple turrets to one periscope so you could switch between them without having to build complicated button systems? You don't want to have to walk around to other periscopes on your ship just because you have a top and bottom turret?

Look no further!

With these simple assemblies you can create a system like this: https://imgur.com/a/GihPh8R

What this system does:

1: Allows you to link multiple turrets to a single periscope
2: Allows you to switch between those turrets by moving your mouse to a certain angle (usually the ends of the turret's firing arc)

For a working demo, please refer to the submarine-box test of this system I have uploaded.

All you need to do is:

1: link up the main periscope (or periscopes!) to the system by connecting the position pin to input 1, and the trigger pin to input 2 on all Automated Switching System relays.

2: The left and right AND gate outputs should be connected to the toggle state of the previous and next Automated Switching System relays.

3: Configure the regex component on each side (left and right) to match the viewing angle / angle range when you want it to switch to the connected turret on the corresponding side.

4: Turn on only the "first" turret relay (meaning, the turret you want the periscope to start on when you first load the submarine). Have all other Switch System turret relays off.
37 Comments
Max  [author] Sep 24, 2024 @ 12:38pm 
The description answers this!
Scourge Sep 13, 2024 @ 7:05am 
What does "left and right and gate outputs" mean? There is no wire output marked as gate on any component nor the periscope or turrets. What am I connecting to what here?
froggx Apr 11, 2023 @ 1:35am 
I haven't gotten all the way done wiring this yet, but I was wondering about something I saw in the comments. Why are people asking about using negative angles or angles >360? Does barotrauma do math different than actual math does math?
LookinDapper Aug 5, 2022 @ 8:52am 
how would you make it work with only two, step two has both AND gates going to the same Relay when i'm working with two guns
Max  [author] Jun 24, 2022 @ 5:28am 
This was made a decent while ago, so new updates might have changed some of the logic.
Seamoose Jun 24, 2022 @ 5:13am 
I had the issue with stuck turrets as well. I did some playing around with toggle lights and found that the signal they were sending from the regex was constantly on for the ones I had issues with. I haven't worked out exactly why this stops the switch, nor why only some get stuck on. My best guess would be that it instantly completes the 'And' check and switches right back?

There is an option to turn off the 'Continuous output' right above the expression input, and once I changed it I had no issues with stuck turrets. I'm relativity new to this game, so I don't know if the option for continuous outputs were a thing back when this was made.

Still not sure why this only effects some of the turrets though. (pretty consistently the left and bottom ones for me)
Max  [author] Jan 5, 2022 @ 7:19am 
I haven't reviewed the system since the update when I uploaded it. So any number of things might have changed to make the system less reliable. You could try changing the Regex to Fambaa's proposal (see a couple comments down), as according to them this makes the turret switching more reliable and smooth.
Kaikai Jan 4, 2022 @ 7:42pm 
Yeah I keep having a similar issue to the one Wilknkroff mentioned earlier. It works fine for a few turns, but then it just ends up stuck on a single gun. Any idea what causes that?
Max  [author] Jun 30, 2021 @ 7:02am 
Thank you!
Ostross Jun 30, 2021 @ 5:59am 
Extremely creative.