Space Engineers

Space Engineers

489 ratings
Whip's Speed Matcher Script
   
Award
Favorite
Favorited
Unfavorite
Tags: autopilot
File Size
Posted
Updated
522.515 KB
Aug 13, 2017 @ 2:41am
Nov 5, 2023 @ 5:06pm
11 Change Notes ( view )

Subscribe to download
Whip's Speed Matcher Script

In 1 collection by Whiplash141
Whip's Scripts
22 items
Description
ATTENTION: This script triggers itself automatically. No timers needed!


Howdy!

This script allows you to use custom inertial dampening to match the speed of a linearly moving target! This makes landing on carriers and sniping pirate ships shockingly easy!

When speed matching is active, you can still control your ship with regular flight commands. However, instead of your dampeners firing to slow your world velocity to 0 m/s, they will instead adjust to make your relative velocity 0 m/s with respect to your target.

If your target changes velocity, you will need to scan it again to update the stored information.



Code Setup
  1. Place this code in a program block
  2. Make a camera and add "Speed Match" to the name
  3. Make a text panel and add "Speed Match" to the name


Matching Speed
  1. Aim at the ship that you want to speed match using your camera
  2. Run the code with the argument "match" (This can be done by binding the command to tool bar as well)
  3. Your ship will begin speed matching!


Maintaining Speed
  1. Get to the speed that you want to maintain
  2. Run the code with the argument "self"
  3. The ship will now use inertial dampeners to try and maintain this speed!

Turning Speed Match On/Off
  • To disable speed matching, use the argument "off"
  • To enable speed matching, use the argument "on"
  • To toggle speed matching, use the argument "toggle"
Note: Script controlled dampeners will turn on or off based on if you use [Z] to toggle dampeners

Changing Scan Range
The scan range for the camera is set for 5 km straight ahead by default. If you want to change the range, you can do so at the top of the code!

Ignoring Certain Thrusters
Add the word "Ignore" into the name of thrusters that you want the code to ignore.

Arguments
Here is a list of all the arguments that the code accepts
Arguments
Functions
match
Scans for a target and enables speed matching once a target is found
scan
Scans for a target. Does not enable speed matching when target is found
self
Saves current speed and attempts to maintain it
on
Turns speed matching on
off
Turns speed matching off
toggle
Toggles speed matching on/off
clear
Clears any saved target and turns speed matching off
increment <number>
Increments the currently matched speed by the input number. Negative numbers decrease the speed and positive numbers increase it.

(Do not reupload without permission, not even to mod.io)
Popular Discussions View All (1)
6
Dec 28, 2019 @ 12:02am
PINNED: Bug Reports
Whiplash141
202 Comments
CDClone Jan 20 @ 10:11am 
i guess matching the speed is a start :P better than the nothing at all i had 10min ago :)
Whiplash141  [author] Jan 20 @ 10:06am 
I do not, sorry
CDClone Jan 20 @ 10:04am 
if you happen to know another way to follow an enemy ship, while staying out of gun range im all ears :P otherwise i guess im at the mercy of your priorities :D :D :D
Whiplash141  [author] Jan 20 @ 10:00am 
Since keen added the ability to natively speed match grids right after I made this, it has not been a high priority with the other things I've been working on.

It is possible, I'd just need to rewrite the script to support it as that would dictate a new user interface as well.
CDClone Jan 20 @ 9:51am 
awesome and less awesome :P

any chance you feel like adding that function? :)
Whiplash141  [author] Jan 20 @ 9:29am 
> does this work with enemy ships?
Yes

> do to allso follow the altitude and if the other ship changes direction?
No
CDClone Jan 20 @ 9:25am 
does this work with enemy ships? and if so, do to allso follow the altitude and if the other ship changes direction?
Whiplash141  [author] Jun 2, 2024 @ 10:21am 
you must be dead on. you didn't need to look through the camera, but it certainly will help lol. and yes, a turret is fine
DakotaHartwig215 Jun 2, 2024 @ 8:48am 
Do i need to actually be controlling the camera to match? Or can I just trigger it by having the camera looking in the general direction and hitting match, how dead on do you have to be to match? Is it possible to mount the camera to its own turret and match that way? I'm saying match too often
Aaron Jaeger Jan 8, 2024 @ 3:22pm 
I figured out a way to display the Speed Matcher information to unsupported LCDs.
You need https://steamcommunity.com/sharedfiles/filedetails/?id=407158161
1. Set up both scripts on your ship,
2. Place a LCD for Speed Matcher
3. Type (TextLCD {Name of Speed Matcher LCD}) into the 'Custom Data' of the cockpit or control seat of your choice