Merlin of Mines - Space Engineers

A set of useful scripts for aspiring Space Engineers!

View on GitHub

Landing Gear Block Handler

This Block Handler handles Landing Gear and Magnets. It can be used to connect/disconnect them, and set/unset them to auto lock.

Default Primitive Properties:

“Enabled” Property

Enables or Disables the given block

#Enable Block
enable "My Landing Gear"
set "My Landing Gear" to enabled
turn on "My Landing Gear"

#Disable Block
disable "My Landing Gear"
set "My Landing Gear" to disabled
turn off "My Landing Gear"

“Power” Property

Turns on or off power to the block. Effectively the same as the Enabled property.

#Turn on
turn on power to "My Landing Gear"
power on "My Landing Gear"

#Turn off
turn off "My Landing Gear"
power off "My Landing Gear"

“Lock” Property

Gets/Sets whether the Landing Gear / Magnet is locked. When setting, only attempts to lock once. If set to a false value, will disconnect.

#Keep trying to lock until locked
until "My Landing Gear" is locked
  lock "My Landing Gear"

#Disconnect
unlock "My Landing Gear"

“Connect” Property

Same as Locked. Gets/Sets whether the Landing Gear / Magnet is locked. When setting, only attempts to lock once. If set to a false value, will disconnect.

#Keep trying to lock until connected
until "My Landing Gear" is connected
  connect "My Landing Gear"

#Disconnect
disconnect "My Landing Gear"

“Ready” Property

Returns true if the landing gear is ready to connect, false if already connected or not ready to connect.

if "My Landing Gear" is ready
  Print "Ready to Connect!"

“Ready Connect” Property

Same as Ready. Returns true if the landing gear is ready to connect, false if already connected or not ready to connect.

if "My Landing Gear" is ready to connect
  Print "Ready to Connect!"

“Ready Lock” Property

Same as Ready. Returns true if the landing gear is ready to connect, false if already connected or not ready to connect.

if "My Landing Gear" is ready to lock
  Print "Ready to Connect!"

“Auto” Property

Gets/Sets whether the Landing Gear/Magnet will auto lock.

if "My Landing Gear" is on auto
  Print "Landing Gear will auto connect"

set "My Landing Gear" to auto

#Turn off Auto lock
turn "My Landing Gear" auto off