Space Engineers

Space Engineers

Not enough ratings
TrailerControlScript (Obsolete)
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
1.278 KB
21 Apr, 2018 @ 12:40am
10 May, 2018 @ 12:31pm
4 Change Notes ( view )

Subscribe to download
TrailerControlScript (Obsolete)

Description
Attention
This script is obsolete and is no longer maintained.
You can find the new script here.

////////////////////////////////////////////////////////////////////////////////////

Have you ever found yourself driving a tractor-trailer combination vehicle down a hill, picked up a bit too much speed, and while braking to control yourself, you end up jack-knifing the whole rig? Well, the solution to this problem is an obvious one. You need to be able to control the trailer brakes as well as the tractor brakes. Just like in real life.

Now, this script won't quite give you perfect control, but what it does do is apply the parking brakes to the trailer when the parking brakes for the tractor are applied. Just park like you would any single vehicle.

It will also synchronize all the lights on the entire rig so all you have to do is press the "L" button and everything turns on or off.

This script basically unifies control of both grids by monitoring what's going on with the main cockpit.

Installation is pretty simple. Just put the programmable block on either the tractor, or the trailer it's towing, and type a unique "tag" in the custom data of the programmable block. This tag needs to be included in the name of the cockpit you will be using when driving.

For example, the name of my cockpit is "Cockpit". The tag I'm going to use is "[Control]". I only used square brackets here because I know I don't use them almost anywhere else, so this will be unique.
My cockpit's name, therefore, will be "Cockpit [Control]", or "[Control] Cockpit", or even "co[Control]ckpit".
The point is it can be any name you want as long as the tag you use is somewhere in it.

If you want to use the light control feature of this script as well, just include the same tag into any spotlight connected directly to the tractor. The last thing to do is whack a remote control block on the trailer (the name and orientation are irrelevant), run the programmable block once, and you're good to go.

A timer block is not required but feel free to add one if you find the script stops running on reload. It won't harm the script in the slightest, so it's ok :)

The script can handle any number of remote control blocks so you can tow as many trailers as you like and their parking brakes and spot lights, interior lights, and corner lights will all be controlled effortlessly from the main cockpit with the press of a button.

Please let me know of any problems, suggestions, or questions you might have. I will do my best to answer them quickly and completely.

Thanks for reading :)

UPDATE:

Pressing and releasing the spacebar, or whatever key you use for normal braking, will activate and deactivate the trailer brakes as well now. Just like real semi trailers :)
Also, if you add the word "brake" into the name of a light, that light will turn on and off to corespond with the pressing of the brake pedal, not the parking brakes. You know, like brake lights :)
2 Comments
CTH2004 25 Apr, 2018 @ 6:02pm 
Try the other verson!

This one inculdes thrusters to!

(Made by him!)
Splitsie 22 Apr, 2018 @ 9:29pm 
I am absolutely adding this to the survival version of the goose! It'd be great to have a little extra braking power for those steep downhills without having to use the thrusters :)