Space Engineers

Space Engineers

Emergency Stop
36 Comments
Subliminal 6 Apr @ 7:25am 
Love this script! I have a small problem however. It activates ALL my connected ships, even if they're powered off. What am I doing wrong?
DataPocalypse 19 Jan, 2022 @ 2:13pm 
Just tried and it work very well. Thank you!
Dr. Novikov  [author] 14 Jan, 2022 @ 2:05am 
@Calibrated no idea, it is 6-7 years old now, could you test it, please?
Calibrated 13 Jan, 2022 @ 12:54pm 
Working?
Wigwambam 5 Aug, 2020 @ 8:00am 
Anyone know if this works on like PAM miners aswell? or is it purely for something being piloted?
PAM stops working if there is no one on the server
Richard Asgard 4 Jan, 2018 @ 12:23pm 
Thanks, It's a great little script, hope I can use it again :-)
Dr. Novikov  [author] 30 Dec, 2017 @ 4:44pm 
@Richard Asgard thank you for the info. I will test it.
Richard Asgard 29 Dec, 2017 @ 11:39am 
The script is broken since last game update, hope you can update the script to work with the new game version. I use it all the time.
Mohawk 14 Sep, 2017 @ 11:30am 
Speaking of gravity drive. Here's a simple script for making a gravity drive WASD drivable:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1134945036
V4D4RS F1ST 3 Jun, 2017 @ 11:29pm 
This is a really smart thing. Especially considering when i regularly fly my ships in excess of 2000 m/s if im not far enough to warrent using a jump drive.
Dr. Novikov  [author] 2 Jun, 2017 @ 11:05am 
@Xanthyn thank you very much!
Xanthyn 31 May, 2017 @ 5:00am 
Heya, since I can't comment directly on your profile, just wanted to let you know that I made an upload in which you are credited for your work on this script:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=936622135
Thanks for making it!
Dr. Novikov  [author] 21 Jan, 2017 @ 10:14am 
@Extevious-V you're welcome!
Extevious 19 Jan, 2017 @ 5:15pm 
A great addition to my fleet :) Thanks for your effort!
Flatfoot 9 Nov, 2016 @ 7:07pm 
Finally, add this to the top somewhere:

string tosclTag = "[TOSCL]";

Add [TOSCL] to your timer block for triggering on loss of control.

Yes, I know it's not very pretty, nor is it optomized. I don't claim to be a coder. I just try to patch bits of code together and pray it works..
Flatfoot 9 Nov, 2016 @ 7:01pm 
in bool ShipIsControlled() :
replace if ((shipControllers as IMyShipController).IsUnderControl) with:
if ((shipControllers as IMyShipController).IsUnderControl)
{
List<IMyTerminalBlock> tosclTimer = new List<IMyTerminalBlock>();
GridTerminalSystem.GetBlocksOfType<IMyTimerBlock>(tosclTimer);
for (int j = 0; j < tosclTimer.Count; j++)
{
if ((tosclTimer[j].CustomName.Contains(tosclTag)))

(tosclTimer[j] as IMyTerminalBlock).GetActionWithName("Stop").Apply(tosclTimer[j] as IMyTerminalBlock);
}
return true;
}

In the correct indentation for us humans to read :)
Flatfoot 9 Nov, 2016 @ 6:57pm 
Ok, I think I've got a working Frankenstein of the code... for whomever is interested...

Replace the void TriggerOnShipControlLost() with:
void TriggerOnShipControlLost()
{
List<IMyTimerBlock> tosclTimer = new List<IMyTimerBlock>();
GridTerminalSystem.GetBlocksOfType<IMyTimerBlock>(tosclTimer);
for (int i = 0; i < tosclTimer.Count; i++)
{
if ((tosclTimer .CustomName.Contains(tosclTag)))
{
if (!(tosclTimer as IMyTimerBlock).IsCountingDown)
{
(tosclTimer as IMyTerminalBlock).GetActionWithName("Start").Apply(tosclTimer as IMyTerminalBlock);
}
}
}
}
Dr. Novikov  [author] 8 Nov, 2016 @ 4:19pm 
@Flatfoot; I don't remember how to check if the timer is already counting down, unfortunately. If the timer gets restarted at full time, I'd suggest using an intermediary timer that starts another timer and then turns itself off. I will look into the timer problem though, but a little later.
Flatfoot 8 Nov, 2016 @ 3:08pm 
@Dr. Novikov; I'm trying to add in a delay to the TOSCL timer that engages a remote autopilot.. problem is; it keeps re-starting the timer back at full time.. what is the code to check if a timer block .IsCountingDown?
Scully 5 Nov, 2016 @ 10:24am 
well not the stop just like another script
Dr. Novikov  [author] 5 Nov, 2016 @ 6:48am 
@Andy, I am not quite sure what the emergency stop script has to do with spawning ships :)
Scully 4 Nov, 2016 @ 5:35pm 
basicly an easy ish way of making ships for dopes
Scully 4 Nov, 2016 @ 5:34pm 
idea maybe an easy ship spawner block that you interact with and can make ships (even downloaded ones) spawn
Dr. Novikov  [author] 22 Oct, 2016 @ 10:06am 
It is available, in order to see the code you need to subscribe and load it into your programmable block. Then you can unsubscribe.
CptTwinkie 22 Oct, 2016 @ 6:37am 
Thanks for informing me of my script's shortcomings. I wish your code was available so I could see what you're doing. I've made my script publicly unavailable since there seems to be no need for it any longer.
Dr. Novikov  [author] 20 May, 2016 @ 11:18pm 
I believe you can.
Nixeen 15 May, 2016 @ 4:27pm 
So can I change ingame this so that it will disable inertia dampaners? So in atmosphere plane battles they will fall instead of keep flying? :)
artiedee 16 Dec, 2015 @ 4:20am 
Alright thanks
Dr. Novikov  [author] 16 Dec, 2015 @ 4:07am 
atriedee, it is already optional, you need to comment out the DisableGyroscopeOverrides(); by adding two slashes before it:

// DisableGyroscopeOverrides();
artiedee 16 Dec, 2015 @ 3:41am 
Would be nice if some of the defaults could be optional. For example I dont awlays want to have gyros overrides turned off, or not always I want dampeners on... PLEASE! :D
Tallinu 13 Dec, 2015 @ 4:27am 
Cargo flights with something like a hydrogen rocket on suborbital trajectories using speed mods (hopping from one place on a planet to another on a ballistic course, free-falling with dampers off at something like 500 m/s between initial burn and braking) should be far, far safer with this script, especially if I can figure out why the auto-hover script is throwing exceptions and get that one working too, for automatic braking at the destination (or mid-flight if pilot has, erm, the kind of problem that results in a quick trip to a medical station). Luckily the result of this script's activation means the triggered timer can reliably "toggle" my gyro overrides to the on position, so if I can figure out what's causing the error in the other script, I should be able to pair them up quite nicely!
Dr. Novikov  [author] 11 Sep, 2015 @ 2:55am 
The built-in Inertia dampeners don't support gravity drives, and I doubt Keen will ever support them.

Gravity drive management would require a far more complex script.
Q_meets_the_doctor 11 Sep, 2015 @ 12:24am 
what would be nice is to use the remote controll to set the course and use the gravity drive to get the momentum then when it hits the set maximum speed it turns off the drive till you hit a set distance then it turns back on the remote controll
Q_meets_the_doctor 11 Sep, 2015 @ 12:20am 
what if it is cheeper to use a gravity drive to thrust foward espicaly since the space balls dont use power
Dr. Novikov  [author] 8 Sep, 2015 @ 8:47pm 
Will probably introduce a delay that will allow pilots to get back into the cockpit or turn the system off before it starts doing its magic.
Dr. Novikov  [author] 8 Sep, 2015 @ 8:45pm 
By user request, updated the script. Now you can place a timer, name it "TriggerOnShipControlLost", and use this timer to set your own actions that need to be performed when ship control is lost. For example:

- Turn on a beacon or an antenna and increase their radii to maximum.
- Toggle some blocks on/off for power saving, so the lost ship stays working and broadcasting longer.
- Turn on an auto-pilot for flying your ship to a predefined GPS location.
- Turn off gravity drives but leave other gravity generators working (comment out the DisableGravityDrives();).