Space Engineers

Space Engineers

Flight Assist
437 Comments
silverbluemx 2 Feb @ 7:16am 
For anyone interested, I've published a small update that I created for my own use a while ago.

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3419652740

As identified in many comments, the original script fails when the block group with the required blocks (default group name : "Flight Assist") does not exist. This very simple fix throws an exception instead of crashing. You can now create or rename the group and recompile.
There are no other changes.
Warlocc 26 Jun, 2024 @ 4:22pm 
Anybody know a working alternative to this?
mint_me 6 Aug, 2023 @ 1:12am 
are we able to get a hold heading.. i know its like but the is vector prograde right.. yes, but if you are using a klang drive to move around you first have to get moving to have a prograde then hold it then u can use ur klang drive (unless you somehow have a perfect klang drive that does tilt ur ship in some way)... doubt.
condottiere 15 May, 2023 @ 7:09am 
The group name to edit in the code is on line 15, configOption BlockGroupName "Flight Assist". Replace the bit in the quotes with your custom group name.

This is useful when running Flight Assist on multiple ships that are sometimes connected on the same grid, to differentiate WHICH ship a certain flight assist group is controlling.

To help reduce overhead when not in active use, you can edit line 23 startCommand "hover smart" to "stop" instead. On every reload of the save game, the script will start in stopped mode by default.
condottiere 15 May, 2023 @ 7:00am 
@ChaosOrder: I'm not knowledgeable about scripting, but I know there is some outdated code in this script that throws the exception error. Here's how I successfully use Flight Assist all the time:

1) Delete existing pro block. Don't know why, but this exception error won't let you recompile in a pre-existing prog block once you screw up the steps here.

2) Add/build fresh new prog block.

3) MAKE SURE YOU ALREADY HAVE A GROUP with control seat and gyros. Default name "Flight Assist". If you use a different name, copy that group name for...

4) Edit prog block and add Flight Assist script. Near top of code, ADD YOUR GROUP name if not the default. I believe it's case sensitive. Click OK.

5) Profit. Everything should work at this point. Add Run argument commands to your control seat toolbar, per description above. Arguments are not case sensitive.
ChaosOrder 22 Apr, 2023 @ 6:32pm 
tried using but gave bunch of exception errors and wont let me recompile
condottiere 22 Mar, 2023 @ 10:33pm 
@TopSecretPorkChop: Subgrid thruster control is not a feature of this script. This script does nothing for your purpose.

You want to use Whiplash's Subgrid Thrusters script, or the new reworked Vector Thrust OS (based on the old well-known script by Vermilion).

IRL an Osprey primarily has two flight modes. Whiplash's script doesn't control rotors, so you'll have to set up a basic 2-position rotor setup using Reverse direction to switch rotor/thruster positions. Then per Whiplash's script page, LOCK rotors to avoid Clangy behavior. I'm using exactly this two-position rotor/thrust setup on my current mothership.

Bonus: This Flight Assist script WILL work with Whiplash's subgrid thrusters, since Flight Assist only uses gyros, not actual thrusters. (I'm using both together on my mothership)
condottiere 22 Mar, 2023 @ 10:22pm 
@Thunderhunt: Works fine for me, with some quirks.

@Waipa: Check comments further down: Req blocks (control and gyro) need to be in the "Flight Assist" group BEFORE editing and compiling the prog block, or else it'll throw an exception when it can't find the named group of blocks (if this happens, grind/delete the prog block, place a new one, and do it again).

Hover stop, hover glide, and hover freeglide have never allowed me to turn -- I'm locked into a single direction along with keeping level. But this has been true for several years.

OTher than these quirks of usage, I still consider this script a must-have on all my most important ships. In case it helps reduce system overhead, I make sure to run "stop" on each prog block AND turn off the block (b/c reloading a saved game with the block on will restart the script in hover smart mode) until I need to use the ship running the script.
[RM] Thunderhunt 29 Dec, 2022 @ 7:49am 
Is this still working properly?
Waipa 4 Sep, 2022 @ 2:28pm 
something seems to be a bit broke, would love to see some update anytime soon? :)
TopSecretPorkChop 31 Aug, 2022 @ 9:42am 
I'm trying build a tilt-jet Osprey-like aircraft but only one of the thrusters is thrusting, even when I'm not giving any input/calling for any movement. Also, only one of the rotors tilts.
Lunatricky 27 Jun, 2022 @ 2:22pm 
@Jimmy Carter have you tried using more gyros and not adding all of them to the group?
SilverStream 16 Jun, 2022 @ 10:22am 
Can this work for a Air Plane??? As can't seam to get it to work. i have a single prop with 4 small Thuster's assisting flight. using air-brakes. i have only forward thrust. i only wish to auto level the craft when not moving
Jimmy Carter 27 Apr, 2022 @ 6:59am 
I have the same problem as MadDog. I am running Hover FreeGlide and I can't rotate my ship. Is there a way to fix this?
Rifter 17 Apr, 2022 @ 3:44pm 
You can rotate in any mode, the script only concerns itself with keeping you vertical
mokuep 17 Apr, 2022 @ 12:27pm 
Great Script, but can i rotate the ship left and right with my mouse in Hover FreeGlide Mode?
Klous 16 Mar, 2022 @ 9:30pm 
I'm seeing the exception with a block group called "Flight Assist"
Djisboredgames 30 Jan, 2022 @ 6:34pm 
Nebual 4 Jan @ 7:09pm
This script still works fine, though if you try running it without a Block Group named "Flight Assist" (as the instructions say), it errors without a clear message (that "exception at Program.GetBlocks()" error). Looks like a Space Engineers update has changed GetBlockGroupWithName() to return null if the group doesn't exist, rather than an empty group as the script expects.

Is there a way to fix this?
Dunnlang 11 Jan, 2022 @ 11:12am 
Yes, disregard my previous comment. Apparently things had become messed up in my old save. Re-grouping the blocks fixed the issue.

Sorry.
Mr. Z 4 Jan, 2022 @ 8:47pm 
Deleted my previous comment because I was ignorant and the solution is literally right below this comment.. For everyone getting an error, try naming the block group "Flight Assist", without the quotes of course. Thanks Nebual.
Nebual 4 Jan, 2022 @ 12:09am 
This script still works fine, though if you try running it without a Block Group named "Flight Assist" (as the instructions say), it errors without a clear message (that "exception at Program.GetBlocks()" error). Looks like a Space Engineers update has changed GetBlockGroupWithName() to return null if the group doesn't exist, rather than an empty group as the script expects.
Dunnlang 1 Jan, 2022 @ 12:20pm 
Yeah, I just booted up the game after about a year away and this script does not appear to be working at all unfortunately. This was extremely useful with my very heavy mining ships, to prevent them from tipping over in gravity!
Yuri2 29 Dec, 2021 @ 2:22am 
Not working at all :steamsad:
FallOut(eX) 12 Nov, 2021 @ 8:48pm 
Caught exception during execution of script:Object reference not set to an instance of an object.
at Program.GetBlocks()
at Program..ctor()
evp143 11 Nov, 2021 @ 5:59am 
Could I use this script for rocket vertical landing and maneuvering during descent in vertical position?
Darkdodo6 26 Jul, 2021 @ 12:46pm 
Hi, I would like to know if it's possible that you help me modify your script (I have no knowledge in C#) to get something like an SAS system to help steer the ships? (I'm thinking prograde/retrogade, normal/antinormal and radial in/radial out)
DM me if you are interested in my idea, or if you want more details.
GaryDefiance 27 May, 2021 @ 2:15pm 
using Hover Freeglide, can't use gyros NOT in the Flight Assist grouping. have 4 of 16 gyros in the group, cannot turn even slightly. script is definitely only managing 4 of them, what's going on here?
Enomotia 16 May, 2021 @ 11:56pm 
Can't see the script in the browse menu.
Ronchi 8 May, 2021 @ 11:42pm 
Has anyone had trouble with this mod not showing up in the mod list ? Or am I doing something dumb ?
Sunburnt Dog Turd 21 Jan, 2021 @ 4:10pm 
This is actually really handy for drone cargo ships on planets. Having a level landing area on my mining rig means less explosions when the cargo drones come to "help" unload!! Maybe not what you where aiming to achieve, but good work sir all the same!
Th232r 15 Jan, 2021 @ 5:28pm 
How about some start/stop toggles?
Krougal 22 Nov, 2020 @ 8:34pm 
So the "turn and burn" seems very iffy; it takes too long to turn the dampeners back on, if it even does it at all. I changed this section from false to true, so it starts braking immediately as it turns retrograde, which at least ensures you will stop, and sooner, but often at a wierd trajectory since it doesn't wait for you to turn around.

AddAction("brake", (args) => {
startSpeed = cockpit.GetShipSpeed();
cockpit.DampenersOverride = true;
}, SpaceBrake)
Myke Sol 25 Sep, 2020 @ 8:12am 
Do you think something similar would be possible for a "Depth Control Script" to work with the latest viral water mod? It seems impossible to maintain a single depth which would be super useful for submarine periscopes.
DEADPOO 7 Jul, 2020 @ 9:54pm 
Anyone tested this with autopilot?
Majikian, GOAT Based PAX 29 Jun, 2020 @ 12:28pm 
Any way to configure something like Hover FreeGlide but without cancelling yaw inputs?
haxwagon 17 Jun, 2020 @ 4:55pm 
@Naosyth Pretty cool script! Any thoughts to have a vector mode be like "Vector current" or "Vector current <speed>" to replace my cruise control scripts also?
Quantumdragon 3 Jun, 2020 @ 9:55pm 
Is there a way to make "Hover Smart" just maintain your current speed instead of trying to make a target/set speed?

also, thank you for this awesome script, i use it in nearly every build, it makes hovercraft a LOT more feasible :)
SnowyRay 12 May, 2020 @ 8:42am 
@Naoisyth No, it's pointing forward.
Naosyth  [author] 11 May, 2020 @ 5:16pm 
@R.S.V.R Is the cockpit or remote control block you're using pointing downward?
@Fèru Or Yes, but the text currently doesn't fit very well on cockpit LCDs. In the PB custom data look for cockpitSurface and set it to a number e.g. 0, 1, 2, etc.
@Excessive Paranoia Possibly, I need to rethink how I output to LCDs now that cockpit LCDs are usable. I want to add more customizability to what gets printed, but I'm not sure exactly how I want to do that yet.
SnowyRay 11 May, 2020 @ 8:24am 
Whenever I hit "Hover Smart" it angles the vessel downwards when I want it to remain level. Is this a bug of some kind?
Excessive Paranoia 7 May, 2020 @ 6:49am 
Would you be willing / able to include a run argument that would display just the component velocities and orientation on an LCD without needing to enable a control mode (similar to "Vector Disabled", but with the X, Y, Z components)? I enjoy flying my ships manually from first-person mode, but making controlled, gliding / coasting approaches to landing pads or docking ports is very difficult without knowing those values.

Thanks

EDIT: Sorry for posting this twice... I thought I'd figured out how to do it using a different argument, but I was wrong. Specifically what I'm looking for is the component velocities even when outside of a planet's gravity so I can use them for reference in zero-g approaches.
Naosyth  [author] 1 May, 2020 @ 12:52am 
Will be fixing soon
Quasi-Bad 11 Apr, 2020 @ 8:56pm 
This script still works, at least its still working in single player. Only warnings are for some depracated code for the lcd displays, but everything still works. If your ship keeps wobbling and doesnt stop, its proably because you have subgrids (aka rotors, parked ships, connectored ships) which cause the ship to become unbalanced.

If your getting errors about objects not being found, make your group and then recompile the code, worked for me anyway.
SEANZGAMING 5 Feb, 2020 @ 7:32pm 
Amazing little script if you're trying to make a roller coaster without tracks! But sadly this doesn't work anymore, hope it gets updated soon!
mr_sebitor (twitch) 23 Jan, 2020 @ 11:48am 
F
Nizzine 8 Dec, 2019 @ 6:32pm 
would be awesome if you could fix this script :cozybethesda:
TableruChan 12 Nov, 2019 @ 11:28am 
Yeah it's bröken and it dösn't work. Would use it defenitivly
Kitsu Shadow 7 Sep, 2019 @ 12:51pm 
How do I disable Pitch Override and only allow Roll?
The Old Fossil 18 Jul, 2019 @ 6:01am 
Sadly does not work in hosted game wobbles all over the shot.
[MPW] ColTeH 🦄 14 Jun, 2019 @ 12:21am 
Currently doesnt work, or atleast not on Dedicated Servers doesnt get blocklist