Merlin of Mines - Space Engineers

A set of useful scripts for aspiring Space Engineers!

View on GitHub

Searchlight Block Handler

This block handler handles Searchlights.

Default Primitive Properties:

Default Directional Properties

“Enabled” Property

Enables or Disables the given block

#Enable Block
enable "My Searchlight"
set "My Searchlight" to enabled
turn on "My Searchlight"

#Disable Block
disable "My Searchlight"
set "My Searchlight" to disabled
turn off "My Searchlight"

“Power” Property

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

#Turn on
turn on power to "My Searchlight"
power on "My Searchlight"

#Turn off
turn off "My Searchlight"
power off "My Searchlight"

“Radius” Property

Gets/Sets the light radius, in meters, of the Searchlight.

Print "Range: " + "My Searchlight" radius

set "My Searchlight" radius to 200

“Range” Property

Gets/Sets the AI aiming distance, in meters, of the Searchight.

Print "Range: " + "My Searchlight" range

set "My Searchlight" range to 200

“Color” Property

Gets/Sets the color of the Searchlight.

You can specify one of the known Colors or provide a HEX value for your own color.

Print "Searchlight Color: " + "My Searchlight" color

set "My Searchlight" color to red

#Magenta
set "My Searchlight" to #FF00FF

“Intensity” Property

Gets/Sets the intensity of the Searchlight.

Print "Intensity: " + "My Searchlight" intensity

set "My Searchlight" intensity to 50

“Interval” Property

Get/Sets the blink interval for the given Searchlight, in seconds.

Print "Blink Interval: " + "My Searchlight" interval

#Set to 2 times per second
set "My Searchlight" interval to 0.5

“Length” Property

Gets/Sets the Searchlights Blink Length, as a percentage of it’s interval. Values are between 0-100.

#Set searchlight to blink once per second using Length and Interval properties
set "My Searchlight" interval to 1 second
set "My Searchlight" length to 50

“Offset” Property

Get/Sets the offset of the Searchlight light source, in meters. This is not to be confused with “Blink Offset”, which is not (yet) mapped directly to a property. You can still set the Blink Offset using Terminal Properties.

Print "Offset: " + "My Searchlight" offset

#Set Searchlight Offset to 3 meters above the Searchlight
set "My Searchlight" offset to 3

“Falloff” Property

Gets/Sets the falloff for the given Searchlight, in seconds.

Print "Falloff: " + "My Searchlight" falloff

set "My Searchlight" falloff to 3

“Rotation” Property

Gets/Sets whether idle movement is enabled for the given Searchlight.

Print "Idle Movement: " + "My Searchlight" rotation is true

turn off "My Searchlight" rotation

“Locked” Property

Gets/Sets whether Target Locking is enabled for the given Searchlight.

Print "Target Locking: " + "My Searchlight" locking is true

turn off "My Searchlight" locking