Space Engineers

Space Engineers

85 ratings
maaax's Hoverbike Script v1.1
6
4
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
46.646 KB
31 Jul, 2020 @ 3:37pm
7 Aug, 2020 @ 9:29pm
3 Change Notes ( view )

Subscribe to download
maaax's Hoverbike Script v1.1

Description
The first hoverbike script designed to work with ships using only upward thrusters!

Watch the demo video on Reddit: https://www.reddit.com/r/spaceengineers/comments/i1fjpn/
Testing hoverbike that's already set up with the script: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2183779064

Coming soon (ish)
  • Automatic stopping (automatically tilts the ship so its at zero velocity)
  • WASD controls (probably, it's still a bit finicky and it might not end up working out)
  • Automatic dock to connectors (haven't started on this one, but once I get WASD finished, it will be easy to implement)
  • Forward scanning for hills, using a forward-facing camera

These features are probably still another week or two out though.

Features
  • NEW! Hover over other grids! Land in hangars, go up ramps, and hover inside other spaceships!

    To use this feature, you need to have downward facing cameras on your hoverbike.

  • Just turn your bike in the direction you want to go, and the script will take care of the rest! It'll automatically fire the thrusters at just the right time to keep it above the ground.

  • Displays useful flight information as you're flying.

Easy set-up instructions:
  1. Load this script onto a programmable block.

  2. Add your cockpit (or remote control), upward-facing thrusters, and optionally: a) downward-facing cameras that allow you to hover over other grids, and/or b) an LCD panel into a group called "Hoverbike".

  3. Run the script with the argument "Init".

The script should be set up now! Just run "Auto" to start hovering or "Land" to slowly lower to the ground.

If you want to change the height at which your ship flies, just open up the script in the programmable block and scroll down to the configuration section!

Useful Tips
  • NEW TIP: Try to place a downward-facing camera near the front of your hoverbike. It will make the bike a bit better going up hills.

  • NEW TIP: Run the script with arguments "Higher" or "Lower" to temporarily raise or lower the altitude at which your hoverbike flies at.

  • If you want to turn, roll the ship (like an airplane or helicopter) by pressing Q and E.

  • If you have an LCD panel, the first number is your forward speed, and the second number is your speed to the right. (If you're going to the left, that second number will be negative.)

  • If you're going to the left too fast, the background of the LCD will turn green. If you're going to the right too fast, the background will turn blue. This can make it easier to tell when you're at a high speed and don't have time to read the numbers.

  • The script automatically flies over hills and bumps, but be careful once you reach high speeds. In that case you can still press Space and C to manually control the thrusters.

  • If you're in an emergency and worried you might crash, you can tip upwards and press space to rapidly slow yourself down.

All Script Arguments
  • Init: Sets up the script for the first time, or when you've changed the blocks in the Hoverbike group.
  • Auto: Starts hovering. This is the command you use to start the ship.
  • Land: Slowly lowers the ship to the ground. This is what you'd use to stop the ship. Just remember to slow down first!
  • Stop: Stops running the script, and returns to normal Space Engineers controls.

  • BlockGroup <New Name>: Run this in case you want to use a different group other than "Hoverbike". This will change the block group the script uses.
  • BlockGroup: Checks which block group the script uses. By default, it is "Hoverbike".

  • Hangar: Sets the ship in "hangar mode" where it hovers lower to the ground. Useful if you are in a hangar.

  • Higher: Raises the ship's target altitude. This can help if you're coming up to a big hill or bump.
  • Lower: Lower's the ship's target altitude.
  • CheckOffset: Displays how much the ship's target altitude has been offsetted by running "Higher" or "Lower".
  • Offset0: Resets the ship's target altitude to its normal value -- this is the same as running "Lower" many times.

Also, if you open up the script, there are a bunch of configuration values you can tweak and adjust for your particular ship.

Changelog
  • 2020 Aug 7: Version 1.1 - Grid Hovering, Safety Improvements
    • Added hovering over other grids: to get it working, add downward-facing cameras to your ship, add them to the hoverbike group, and re-run the programmable block with "init"!
    • Added Safe Falling: bike will start braking slightly sooner during falls, to give it more time to react later on in case there is a hill or something up ahead. This can be configured using the SAFE_FALLING option.
    • Added the ability to use the cockpit's LCD panel, the programmable block's LCD panel, or many LCD panels at once. (This does not change the actual text that is displayed)
    • Added hangar mode and ability to raise/lower altitude on the fly
    • Improved handling if one of the thrusters gets damaged
  • 2020 Jul 31: Version 1.0 - Initial release.

Enjoy!
30 Comments
kirb 2 Sep, 2024 @ 10:15am 
For some reason with this script my hover vehicle is able to keep itself up just fine but when i move horizontally in any direction the lift thrusters go limp and i fall to the ground...
kinngrimm 22 Apr, 2024 @ 6:08am 
on the multziplayer server i am, interial dampners are deactivated complettly, would this script still work?
PimpMyDog 16 Apr, 2024 @ 2:41pm 
Hey have you tried doing it with front camera scan yet? On flat grounds this script works the best of the ones I have tried.
Blacky Watchy 6 Apr, 2022 @ 2:08am 
the script is giving me problems, i have only a remote in the group but im getting triggered a message saying that there can only be one cockpit on the group
Tzeentch's Aeldari Spirit Stones 18 Oct, 2020 @ 11:28am 
i tried this on a little baby worker bee design i made and it encountered an exception error when running "Auto" Argument after running "Init" Argument, i'll do my best to write it here.. (Init Argument showed no errors)

Caught exception during execution of script: Function does not accept a floating point Not-a-Number values.
at System.Math.Sign(Single value)
at Program.DoUpdate()
at Program.Main(String argument, UpdateType updateSource)
at
Sandbox.Game.Entities.Blocks.MyProgrammableBlock.<>c__DisplayClass46_0.<ExecuteCode>b__0(IMyGridProgram
program)

at
Sandbox.Game.Entities.Blocks.MyProgrammableBlock.RunSandboxedProgramAction(Action')
action,
String&
response)
GamerZero 1 Oct, 2020 @ 11:47am 
is it possible to add this to the preload scripts?
DecaRabia 28 Sep, 2020 @ 4:44am 
"Forward scanning for hills, using a forward-facing camera"
I wish it will be next feature. I need for not kill myself every ride I made! LOL!
Amazing script, I fixed the WASD control using other trusther in any direction, but I love the hovering system and how I drift when I turn riding.
Thumbs up for the hangar mode too, very smart and usefull!
LeftFieldRebel 24 Sep, 2020 @ 6:42pm 
ah that would be my problem solved :) woot, cheers Captain Insano
maaaxaltan  [author] 23 Sep, 2020 @ 2:32pm 
Thanks Captain Insano. I've updated the the guide so it now says the correct command
Captain Insano 22 Sep, 2020 @ 9:09pm 
I wasn't able to get Raise or Lower to work. I finally looked through the program text and found out the commands are "Higher" or "Lower" not "Raise" or "Lower". Might want to fix that on your page as I see others had issues. In any case I LOVE the script, having lots of fun playing with it. Well done.