Space Engineers

Space Engineers

69 ratings
transferCTRLs
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
468.823 KB
17 Mar, 2019 @ 10:40pm
29 Nov, 2020 @ 9:51pm
8 Change Notes ( view )

Subscribe to download
transferCTRLs

In 1 collection by jouster500
Jousters SE-PB Toolbox
8 items
Description
Players Script: Ever wish cockpits movement could control things other than wheels and thrusters? How about those items on a subgrid? Wish no more, as with transferCTRLs you'll transfer your WASD and mouse control to a group of devices of your choosing!

That said, this script concerns itself with axial and gyroscopic movements and translating them to objects of user choice, which reduces controller hotbar configs and simplifies advanced control schemas such as cranes, welder arms, gravity drives, VTOLS, projection movement, etc.

IMPORTANT CHANGE:
Ill be migrating to custom data tag usage sometime in the future. As of right now, both the old and new way works (new way is appending [tcj5] to the front of the appropriate line in data), but its processing on spaces, not all whitespace characters. Please adjust any old builds accordingly until this can be fully addressed.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CUSTOM DATA INFO:
To define blocks as part of the script, give them the default label "[ctrl]" in their name.
Inside a block with the tag, define the following;

number, ("lr", "ud", "fb", "pit", "yaw", "rol"), true/false

1.) The number represents the group number of the item and which the controller and controlled will respond to.
This is required for all blocks as per system.
2.) The string expression refers to the control direction this object should listen to. For reference, lr refers to left\right, ud to up\down, fb to forward\back, pit to mouse pitch, yaw to mouse yaw, rol to mouse roll.
To be specific,
pit and yaw will be mouse controls.
All other input options are controlled via keyboard.
3.) True/False indicates whether user input should do an opposite action instead of default behavior. Play around with the controls to find whichever is more comfortable. Default is false.

So an example of acceptable input would be
1 ud true = this will set this object to respond to group 1 controls in the up/down direction (jump/duck) and flip the input streams (up becomes down, and down becomes up).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Arguments:
While not entirely necessary, if you have a cockpit marked off as the main cockpit, you can pass numerical values to the script which will change the main cockpits group control to the value that you passed. Ideal if you are working with many groups from one cockpit.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Current support;
+Pistons (Make sure you set velocity!)
+Rotors (Make sure you set velocity and braking torque!)
+Thrusters!
+Projectors - Also includes mouse detection for rotational inputs!
+Gravity Generators!
+Lights!

Thruster support has been added! While this can allow for VTOL like capabilities, its no where near as sophisticated as whips script which I highly recommend checking out!

I will be looking into wheel support in the future. So enjoy what the script currently has to offer! Oh yeah, and if you would like to see this script fully functional in dedicated servers, go upvote this feature request![support.keenswh.com]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Personal Notes:
Now I know what you may be thinking, but no, this will not work immediately for bipedal robots or other sophisticated motions. However this project serves as a basis for future projects revolving around item groups and movements that exhibit such behavior. Consider this script as the feet dipping.
156 Comments
jouster500  [author] 24 Mar @ 7:11pm 
I can only do so much if people do not report issues, or not follow up on their complaints.

My mechanism for control involves powering the mechanism in question, and i adopt a philosophy to only change what you need. If I had elected to set the rotor and hinge speeds to some arbitrary value, It would not be a stretch to imagine there would be a camp of people who didn't want this to occur. so there is an element of preference and choice.

Furthermore, its important to point out this script covers more functionality than just simply rotors and pistons. It also covers thrusters, projectors, gravity generators, lights, and some degree of wheel control. This script also provides group control where you maintain multiple relationships on a single grid, whereas PARK seems capable of only supporting one at the moment.
Soggy 22 Mar @ 9:58am 
This is why i use PARK lol to many unwanted issues that simply does not exist with his script.. this is redundant
jouster500  [author] 30 Apr, 2023 @ 12:00pm 
for rotors and hinges, you need to make sure that the velocity is set to non-zero. If its still broken, can you share a link to the blueprint of the bug/issue and I can investigate it for you?
Dragkna 28 Apr, 2023 @ 12:45am 
This darn thing turns my hinges that are set to 'pitch' off, which bothers me even more because it has a functioning roll feature that I need unlike Whip's.
jouster500  [author] 24 Apr, 2023 @ 6:38pm 
Do you mean "return to starting position" or do you have some other meaning of the word "return" in mind?
Warding Halo 22 Apr, 2023 @ 5:34am 
Is there a way to make the hinges/rotors return when releasing the key?
jouster500  [author] 12 Jun, 2022 @ 12:11am 
mouse wheel does not have a possible implementation; you get the mouse gyroscope and the keyboard keys. Rol corresponds to the keyboard keys used for rolling your ship left or right.
Volg 8 Jun, 2022 @ 5:53am 
is mouse "rol" the mouse wheel rolling? i have tried to set a piston to "1 rol false" but nothing i do with my mouse seems to make it move. i was hoping rol was tied to scrolling the mouse wheel to control the piston extension.
Shinigami 20 Apr, 2022 @ 6:05pm 
@jouster500

[ctrl] Cockpit ; 0
[ctrl] (Any Pistons, which was 12) ; 0 fb true
[ctrl] Advanced Rotor ; 0 yaw false
[Ctrl] 3x3 Hinge ; 0 pit false

The pistons worked fine, it just kept shutting off the hinge & rotor.
The line i changed was deep near the bottom, referencing rotors itself. I changed

1 rotor.Enabled = move != 0; // Turn on if we are moving
2 rotor.Enabled = false;
jouster500  [author] 20 Apr, 2022 @ 5:43pm 
Alright, if the velocity and breaking torque was set, can you tell me the following?;

1.) what line did you assign it in the custom data? (IE, "1 lr true" for example)
2.) What configuration did you assign the cockpit? (The number group you wanted it to control) Make sure this number is the same as whats assigned in the block itself.)
3.) Do all blocks (controller and block) have the tag [ctrl] in their name?

I have an old build using an older version of the script but it basically functions properly here (you can rotate the thrusters by pressing the space/duck keys). You can use it for reference if you need to.
https://steamproxy.net/sharedfiles/filedetails/?id=1908996284