Space Engineers

Space Engineers

Multiple turret control system - Updated
279 Comments
CynicDragon 25 Oct, 2023 @ 2:44pm 
So it works or doesn't? Last author comment is confusing
KC MUTE 6 Jul, 2023 @ 1:22pm 
Can you make a skipt to where a turret stays at on spot. its the m1a2 abrams turret!
MasterRage 30 Sep, 2018 @ 9:12pm 
will this worrk with mod turret weps and such ?
Phoenix 28 Sep, 2018 @ 8:54am 
how to use it?
like, I don't know
Ashen Raven 31 Aug, 2018 @ 12:38pm 
yeah
Bad_Idea  [author] 31 Aug, 2018 @ 4:57am 
Hah, yeah, this is fairly old and unusable by now, even updated i don't think it'd be super useful... At least it is good for nostalgia!
Ashen Raven 30 Aug, 2018 @ 1:46pm 
jesus, that old music, such nostalgia
imaratiooo 6 Dec, 2017 @ 10:11pm 
Is it possible to control ready-made turrets (not self made turrets using rotors) with this script?
I wanna control multiple ready-made turrets at the same time.
EnjoyCoke 10 Jan, 2017 @ 4:37am 
Can someone tell me how to tell a programmable block to read the current angle of a rotor (or advanced rotor in my case) so that I can tell my programmable block to shut down gatlings whenever a certain rotor is at a specific angle, and turn them back on when it's not?
That'd be really helpful!
EnjoyCoke 10 Jan, 2017 @ 4:23am 
I don't think this script works any more?
Oh well :)
Korvatus Klok 13 Dec, 2016 @ 6:22pm 
I'm having some issues with the script. I'm trying to build a player designed gattling turret using a common yaw advanced rotor, a pitch advanced rotor and a turret pitch1 advanced rotor but for some reason the turret pitch1 advanced rotor is not responding. Any pointers?
Space Pirate 20 Nov, 2016 @ 8:16am 
is theyr a new virsuon of this script? Cous it dosen't seem to work enymore. I tryd to set up this coud and it only makse the turret speen but not folowing the slave rotor :(
KonSumee 14 Nov, 2016 @ 12:15am 
Including thruster and gyro input from the orignal remote control, carried out through every other remote control. Aka, imagine how you fly a ship normally, any ship (forward, backward, left right, with WASD), but copied across to all the other drones, so you're flying all of them at once.
Bad_Idea  [author] 13 Nov, 2016 @ 1:47pm 
Should be possible, i've done something like that with a guided torpedo system.
KonSumee 13 Nov, 2016 @ 8:21am 
Is there some way we can use this same principle of "mimicing" the original remote comtrol, but use it with "flying", per say? aka the slave remotes fully the same inputs as the original so that you can fly multiple drones in unison. What do ya reckon?
The_1_N_Only 24 Oct, 2016 @ 9:12pm 
I know this is probably a bad time to ask this... but can anyone help me with the script?
I have 5 turrets on my ship, 3 facing front, 2 facing aft. I got the 3 on the front to work, but I do not know what to edit in the script to make the aft turrets turn to the direction the front turrets are facing.
Please send halp.
P.S.I have two programmable block running, 1 for the 3 front turrets and the other for the 2 aft turrets.
Bad_Idea  [author] 7 Jul, 2016 @ 1:05pm 
Well, it's not what it's meant for and there's way better ways to do it, but you're always free to try!
Korvatus Klok 6 Jul, 2016 @ 4:46pm 
Can this script be used to control elevators on aircraft?
Bad_Idea  [author] 15 Mar, 2016 @ 10:55am 
It still works, but it's just inferior to many other turret scripts around! Really, all the script is doing is copying the angles of the parent rotor onto the child rotor.

But yeah, should still work!
Throttle 15 Mar, 2016 @ 9:06am 
What happened with this script? It was everywhere and then suddenly stopped being shown around. Did it break? I typically like to find non-weaponized uses for things and I finally have an idea to use this. Thanks.
Bad_Idea  [author] 5 Mar, 2016 @ 6:18am 
Maybe, these turrets really aren't very advanced. They just copy orientations. It'd be a lot quicker for someone to code a new system to be honest.
Hawk Stardrake 4 Mar, 2016 @ 9:20pm 
Hey, are you going to update this script? Maybe add some features to work with the new script-based modless radar?
RedandBlue 6 Jan, 2016 @ 1:28pm 
hi . grate script . but one thing ! can the Pitch rotors be changed out with Hinges ?
jackik 29 Oct, 2015 @ 1:14pm 
it doesn'T
it seams i spammed the run function on the programable block and it couldn't handle that. i tried again running it once and it worked fine. It could be something with the -Timer- string that Space engineers can't handle more than once in one tick.
Bad_Idea  [author] 29 Oct, 2015 @ 9:46am 
Huh, that's odd. I suppose KSH could've changed things around. Try again, see if it tells you what line it's throwing bile at.
jackik 29 Oct, 2015 @ 7:08am 
i just got: "Caught exception during execution of script: Input string was not in a correct format."
Vilnius 20 Oct, 2015 @ 2:05pm 
I am curious as to know whether this code will work with in game AI turrets that already have the Yaw and Pitch inbuilt.
tinnman94 25 Jul, 2015 @ 1:55pm 
what do I do to stop the slaved turrets being inverted in the pitch movement
DeckardCain860 15 Jul, 2015 @ 2:12pm 
Yes, I managed to get a right-side up controller to work upside-down and right-side up turrets simultaneously by inverting with TurretYaw2. For some reason I can't get an upside down controller to work ANY turrets, regardless of orientation. I don't know C# so I'm stumped.
Bad_Idea  [author] 14 Jul, 2015 @ 6:52am 
Well, the script copies rotation values of the parent controller to all of the slaved turrets. This means a right-side up controller will have some major issues with turrets facing other directions. The thing you need to do is invert the in-/outputs (to be honest, i am way too tired right now to figure out which one).
DeckardCain860 13 Jul, 2015 @ 5:19pm 
is there a way to get this to work with my turret controller being mounted upside down in relation to the turrets its controlling? ive gotten a right side up controller to operate an upside down turret via a "turretyaw2" addition, but not vice-versa
Bad_Idea  [author] 12 Jul, 2015 @ 3:47am 
Alas i have not, adding (automatic) gun convergence needs things i do not have access to, such as the locations of other ships. Manual convergence could be done, but i am not very keen on that idea.
The Apples Cry At Night 5 Jul, 2015 @ 8:18pm 
I am an honest person, so I'll say immediately that I am also a lazy person and have little intention to read through 25 pages of comments. I've made it through about 10, searching for the word but not actually reading, and I haven't found it, so I must ask:

Have you updated the code to include convergence?
kennet0508 7 Jun, 2015 @ 6:58pm 
Still asking if you can PLEASE implement TurretYaw1 and TurretYaw2

i really want this creation type to work, and your script is really nice and responsive!
- https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=457324050

would be perfect
Malhavoc 4 Jun, 2015 @ 9:49am 
Would it be possible to slave gatling turrets to something like this?
kennet0508 3 Jun, 2015 @ 7:52pm 
Still no dice on the TurretYaw2? (to make bottom mounted turrets)
AScaryDinosaur 31 May, 2015 @ 9:12am 
alright, thanks anyway
Bad_Idea  [author] 31 May, 2015 @ 5:08am 
Sorry, no, that's not something i will do, would take way too long. You'll have to do with the video.
AScaryDinosaur 30 May, 2015 @ 12:29pm 
Could you put the instructions into words, i am not a visual learner, i learn by reading and doing, it is better for me to have something i can do at my own pace and not try to keep up with yours as in the video
data1chi 28 May, 2015 @ 5:27am 
Can I remotely control a drone with 2 turrets and a separate aiming camera?
Colony 27 May, 2015 @ 3:26pm 
bashing head... yeah, ok... that explains it. I haven't even touched that block yet, because i was expecting to see it at least in the "subscribed list" when you go about checking mods... thank you!
Bad_Idea  [author] 27 May, 2015 @ 5:24am 
This script is not a mod, it shows up in the lists of scripts in the programmable block. Place a programmable block - Edit - Browse workshop - the script should be there.
Colony 26 May, 2015 @ 5:11pm 
I subscribed to this script too, but it has never shown up in my scripts list when I select what mods I intend to use.
Any help or advice?
raffa2 25 May, 2015 @ 2:49pm 
somehow it started working, i didn't even need to change anything from my previeous configuration
Bad_Idea  [author] 25 May, 2015 @ 10:59am 
Raffa, you either forgot to name something properly or forgot to add something. Please check the video up above where it shows you how to set it up properly.

Well, i was going to update the code with the fix (Thanks again for noticing it, Krail) until i realized that i´had several tests coming up... Meeeeeh...
raffa2 23 May, 2015 @ 6:00pm 
Caught exception during execution of script: Input string was not in a correct format.
Bad_Idea  [author] 18 May, 2015 @ 2:13pm 
Krail, cheers for that! Will do an update shortly, just to add that in. Should have noticed that myself... :).
krail 18 May, 2015 @ 3:56am 
I fixed the <0 inversion issue. Replace the regex expression [^.0-9] in line 39 with [^.0-9-], an extra hyphen on the end. You were removing the negative symbol from the result.

Awesome script by the way, helped me understand the DetailedInfo function.
Reverend Revenant 14 May, 2015 @ 10:33pm 
With update 1.082 there's a new option in the K-terminal that says "Argument" and when I mouse over it says "An argument passed to your code when clicking the Run button"
It doesn't seem to affect the performance of your code, but just a heads up.
The Magic Murder Bag 30 Apr, 2015 @ 4:05pm 
I must say, your script has help making RC turrets a staple in ship production on my end (see Hiigaran destroyer and Hiigaran Battlecruiser) especially since I lack scripting capacity.