Space Engineers

Space Engineers

Not enough ratings
CAT Custom Turret Rotor Slaving
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
1.701 KB
14 Feb, 2015 @ 9:01am
6 Mar, 2015 @ 2:14pm
5 Change Notes ( view )

Subscribe to download
CAT Custom Turret Rotor Slaving

In 1 collection by Loues.S.Cat
CAT Scripts
12 items
Description
A script that tracks the angle of two Master rotors and creates a volocity for each of the slave rotors based on the diffrence between their current angle and the appropriate Master Rotors angle. The effect is that the slave rotors will move toward the angle of the master rotors so if you adjust the angle of the master rotors the slaves will follow!
It is useful for building custom turrets, where one such turret can control the targeting of many.

>> Use multiple slave rotors. You can have as many [RS1], [RS1i], [RS2] and [RS2i] tagged rotors as you need.
>> There should be only one of each of the [RM1] and [RM2] rotors.
>>The difference in angle between the rotor with tag [RM1] and the slave rotors [RS1] and [RS1i] rotors is converted to a velocity and applied to the slave rotors.
>>The same is done for [RM2] and the slave rotors [RS2] and [RS2i] rotors.
>>The result will be that all the rotors maintain a similar angle allowing them to be used in custom turrets.
>>This script is very basic and unlikely to be directly useful. It is indented to be a starting point for further development.
Popular Discussions View All (2)
6
1 Mar, 2018 @ 7:39pm
How to use this script
Loues.S.Cat
0
6 Mar, 2015 @ 2:36pm
Copy Paste Version
Loues.S.Cat
24 Comments
Loues.S.Cat  [author] 26 Jul, 2021 @ 10:13pm 
This is very old. I will have a look at it again when I have the time, for now I think I will just unlist it.
Turret problems 26 Jul, 2021 @ 7:56pm 
Im currently trying to user this to slave a MART turret to an exterior rotor turret, the script doesnt seem to run correctly, is there a new version?
Keatosis 1 Mar, 2018 @ 7:39pm 
Thanks
Loues.S.Cat  [author] 27 Feb, 2018 @ 3:32pm 
Gods this is so old...
I'll fix it as soon as I can, but there are better turret scripts out there now.
Keatosis 18 Feb, 2018 @ 11:51am 
Doesn't work, what am I doing wrong?
Djelle 13 Sep, 2016 @ 6:53pm 
Just what I needed. This script solves several problems with my manned turret. My turret is front heavy. So it was very uneven to stear in gravity. I made a simple well balanced main turret of 2 rotors + Remote + 2 x gyros. And a camera on the real (slave) turret. So I can stear the turret remotely. Also, it was imposible to rotate it (yaw) when pointing directly up. I solved this by ofsetting the pitch by 45. So the (simple) main turret can pitch -45 to 45 which is translated to 0 to 90 on the real turret. Works like a charm :steamhappy:

U have a bug in ur code. Probably a leftover line of code which I don't see a use for.
In line 44: "blocks[e].SetValueFloat( "Velocity", 0 );"
It sets ALL rotors to 0 :steamfacepalm:

Keep up the good work.
mrbojinkles 28 Aug, 2015 @ 11:32am 
You've done it again you awesome code-master you! I'd love to have an option to have the tagged rotor's angle shown in its name, because my rotor placement is sloppy, and I have to add adjustments to the script.
Loues.S.Cat  [author] 8 Jun, 2015 @ 7:14am 
The fastest you can set a timer to work is to trigger itself rather than to start itself. that lets the script respond very rappidly.
You can do that with this script too. It is how I used it.
kennet0508 7 Jun, 2015 @ 7:09pm 
Btw, have you tested CMDR Bad_Idea's Turret system?

- https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=378793632

Im curious what makes his rotors move so instant and on track, as it makes small turrets more viable

it seems he has set up the timer block to move faster than its supposed to, could this be implemented into your script? would that mess up with the ability to slow down the rotor movement you implemented? etc

with the setup you have where you can slow down the rotors is Key in my newest Prototype, where im making a set of a 4 huge engine setup on rotors, but the size makes it impossible to use without slowing down the rotors
MrClifford 6 Jun, 2015 @ 1:57pm 
thats what i have done its even on reapet with a timer