Space Engineers

Space Engineers

381 ratings
Cockpit Piston, Rotor & Hinge Controller
2
8
2
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
410.705 KB
3 Jun, 2019 @ 11:56am
11 Feb, 2023 @ 12:35pm
13 Change Notes ( view )

Subscribe to download
Cockpit Piston, Rotor & Hinge Controller

Description
Script for controlling Hinges, Rotors and Pistons from a cockpit or remote control, using the regular movement keys, allowing for control of up to 6 groups of rotors or pistons!

Supports: Cockpits, Seats, Remote Controls and Custom Turret Controllers as inputs.

If you have changed key bindings, use whatever you have assigned.
If you're using a controller, the pistons may move quite fast, you can change the multiplier to fix this :)

The valid controls (with default key bindings) are:
A & D
W & S
Q & E
Space & C
Mouse X-axis
Mouse Y-axis

Individual blocks in a group can have their input reversed by adding "rev" to their custom data.

Adjustable values in the script are:
- The names of blocks / groups - to be left blank to disable an input.
- Speed multipliers for each control input
- Acceleration for pistons and rotor/hinges respectively

Comments in the script should explain usage.
If you type a name wrong, the programmable block will throw an error telling your what is wrong.

Quick example build using the script:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2176469225

MP REMINDER:
When using the script in MP, the controller (cockpit, seat, remote) should be on a dynamic grid.
That means Small grid, Large grid ship/rover or a Sub-Grid of a base/station.

The reason for this, is that the game does not seem to transmit movement info from controllers placed directly on static (station) grids, presumably because Keen thought it would be a waste of data to send movement info for something that can't move, which makes sense, but does mess with my script!
251 Comments
Caazego 10 May @ 10:55pm 
@bowan if you subscribe to the script then search your game installation drive for "1760157651" you will find a directory. Open the file Script.cs in that directory and you can do the copy/paste yourself.
Bowan 3 May @ 2:50pm 
can someone copy paste the entire script please its not allowing me to upload the script in my server even though I have them enabled.
Naix 16 Jan @ 9:28am 
//Block/group names (eg. "Piston 2"), leave empty (eg. "") to disable that output
string AD_Name = "Crane Hinge Wrist 3"; //Name of A & D Block / Block group
string WS_Name = "Crane Pistons Forward"; //Name of W & S Block / Block group
string QE_Name = "Crane Advanced Rotor Wrist"; //Name of Q & E Block / Block group
string SpaceC_Name = "Crane Hinge Wrist Middle"; //Name of Space & C Block / Block group
string MouseX_Name = "Crane Advanced Rotor Rotate"; //Name of MouseX/LeftRight Arrow Block / Block group
string MouseY_Name = "Crane Piston Support"; //Name of MouseY/UpDown Arrow Block / Block group
Naix 16 Jan @ 9:28am 
//Speed multipliers - negative values invert direction
double AD_Movespeed = 10.0; //A & D speed multiplier.
double WS_Movespeed = -2.0; //W & S speed multiplier.
double QE_Movespeed = 10.0; //Q & E speed multiplier.
double SpaceC_Movespeed = 2.0; //Space & C speed multiplier.
double MouseX_Movespeed = 0.1; //MouseX speed multiplier.
double MouseY_Movespeed = -0.1; //MouseY speed multiplier.
Naix 16 Jan @ 9:28am 
For me is Working very nice :D
"reverse mouse is fixed :D" you just need to reverse double Mouse X and Y and string mouse X and Y.
MrXSmiles420 8 Jan @ 8:15pm 
To add below you can not individually rev the mouse axi and the up down left right keys. pretty sure the axi is base on those keys as well
MrXSmiles420 8 Jan @ 8:11pm 
Flawless absolutely what was needed. For those who cant get it to work you need to name each (joint) rotor hinge ect. then go into the scrip and insert the names in between the "" example

Correct:
string AD_Name = "base rotor"; //Name of A & D Block / Block group
string WS_Name = "Hinge"; //Name of W & S Block / Block group
string QE_Name = "Pistons2"; //Name of Q & E Block / Block group
string SpaceC_Name = "Pistons"; //Name of Space & C Block / Block group
string MouseY_Name = "neck"; //Name of MouseX/UpDown Arrow Block / Block group
string MouseX_Name = "Hinge3"; //Name of MouseY/LeftRight Arrow Block / Block group
string BN_Name = ""; //Name of B & N Block / Block group
MrXSmiles420 8 Jan @ 8:11pm 
The name of the peace your trying to control should go where empty name is. now in the script it doesnt say empty name you will see "" simply click inbetween them and enter the name you named your part too. now if the spelling is wrong the entire script wont work.
MrXSmiles420 8 Jan @ 8:11pm 
string AD_Name = "empty name"; //Name of A & D Block / Block group
string WS_Name = "empty name"; //Name of W & S Block / Block group
string QE_Name = "empty name"; //Name of Q & E Block / Block group
string SpaceC_Name = "empty name"; //Name of Space & C Block / Block group
string MouseY_Name = "empty name"; //Name of MouseX/UpDown Arrow Block / Block group
string MouseX_Name = "empty name"; //Name of MouseY/LeftRight Arrow Block / Block group
string BN_Name = ""; //Name of B & N Block / Block group
MrXSmiles420 8 Jan @ 8:11pm 
As to questions of adding more buttons unfortunately its not doable being the key binds are based of ones that are considered movement binds inside the game. so theres no way to add more unless the devs randomly decide to expand that. wich they wont.

There is a question of controlling two hinges with one setting im going to experiment with that using two programable blocks and running the script twice with different settings . maybe even a second control console.