Ananace's Hinge/Rotor drive script

V 2020-07-04 mod for Space Engineers

0
Downloads today
152
Downloads total
0
Comments

description

A rather complex script for doing all manner of input controls for hinges, rotors, and pistons. Includes auto-centering functionality as well as velocity scaling to avoid flips when turning at speeds.


Using the script;

Build a vehicle of some kind with pistons, rotors, or hinges, attach at least one seat/remote control to it.
Configure each of the moveable blocks that should be controlled using a single-line of Custom Data, some examples are provided below.

The line should start with the configured prefix ("!acs" by default) and can include the following configuration keys, separated by spaces;
(no)center - Sets the block to attempt to automatically center itself when not actively moving. (Default on)
(no)inv - Inverts the direction of movement. (Default off)
(no)scale - Scales the valid range of movement based on the vehicle velocity. 100% below 5m/s, and then slowly decreasing to a target value at the target speed. (Default off)
onlypos
onlyneg - These limit the affecting input to only acting on either positive or negative values.

For controllers the following keywords are valid; (Also prefixed with the Custom Data prefix)
primary - Will make this the main input whenever it's active.
ignore - Will never make this the main input.

Additional values can be set in a similar manner, key and default values specified below;
input={movex,movey,movez,movexz,rotatepitch,rotateyaw,rotateroll} - Sets what input the block should listen to.
speed=10 - The velocity for movement, per second. Deg/s for rotors/hinges, m/s for pistons.
centerpos=(0) - Overrides the center value for the block for when auto-centering, default if not specified is 0 for rotors/hinges, middle of the range for pistons.
scalestart=5 - The speed (of the vehicle) at which the turning should start scaling, in m/s.
scaleend=25 - The speed (of the vehicle) at which the scaling should end, in m/s.
scaleendmod=0.25 - The value modifier at the end of the scale, 0.25 means that the rotor/piston/hinge will only be allowed to move to 25% of its range - from the center position - as the vehicle reaches the scaleend speed.
lock=0 - Locks the hinge/rotor if the target difference is less than the value specified (less than N deg for rotors/hinges, less than N meters for pistons). Can cause shaking when auto-centering is also enabled.
c - Limits the block to only acting on the controller matching the given name or containing the name in their custom data under the specified prefix. (Can't contain spaces)
duplicate=<name> - Makes this block use the same input as the given block, can be matched by name or tag - see below. (Can't contain spaces)
tag=<name> - Tags this block with the given tag, to make it easier to use as a source for duplication. (Also can't contain spaces)

Some examples, along with a possible use-case for each;

"!acs input=movex center scale" - For car steering using a hinge/rotor, will limit turning at high speeds to avoid rolling.
"!acs input=rotatepitch center speed=90" - For controlling pitch flaps on an airplane.
"!acs input=movez nocenter inv" - For moving a lift up and down with space/ctrl using ceiling-mounted pistons.
"!acs input=rotateroll center scale scaleend=25 scaleendmod=0.05" - For handling rotor-mounted roll thrusters, that should only turn to 5% of their angular limit when the vehicle is above 25m/s
"!acs input=movez center onlypos" - Will extend a piston or rotate a rotor/hinge when pressing space, returning it back to zero again when released. Good for deploying air/ground-brakes.

Credits

  • 22 Sep 12:42
    Version 2020-07-04



Files


22.09 2020
Modhoster user rating
no rating Votes

Empfehlungsrate

-/-      
noch nicht genug Stimmen

Do you think this mod should be featured?

Mod abonnieren
Abonniere Ananace's Hinge/Rotor drive script
Der Mod wird automatisch beim nächsten Start von Space Engineers installiert.
Space Engineers
mod.zip
5.01 KB 152

0 Comments for Ananace's Hinge/Rotor drive script

You have to log in for writing comments.
You can also sign up for free, id you don't have an account yet - it only takes 5 minutes.

No comments yet.

Write the first comment...

      }