Merlin of Mines - Space Engineers

A set of useful scripts for aspiring Space Engineers!

View on GitHub

Light Block Handler

This block handler handles lights and spotlights.

Default Primitive Properties:

Default Directional Properties

“Enabled” Property

Enables or Disables the given block

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

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

“Power” Property

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

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

#Turn off
turn off "My Light"
power off "My Light"

“Radius” Property

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

Print "Range: " + "My Light" radius

set "My Light" radius to 200

“Range” Property

Same as Radius. Gets/Sets the range, in meters, of the Light.

Print "Range: " + "My Light" range

set "My Light" range to 200

“Color” Property

Gets/Sets the color of the Light.

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

Print "Light Color: " + "My Light" color

set "My Light" color to red

#Magenta
set "My Light" to #FF00FF

“Intensity” Property

Gets/Sets the intensity of the Light.

Print "Intensity: " + "My Light" intensity

set "My Light" intensity to 50

“Interval” Property

Get/Sets the blink interval for the given light(s), in seconds.

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

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

“Length” Property

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

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

“Offset” Property

Get/Sets the blink offset (when during each interval does the light start blinking?) for the given light(s), in seconds. Values are between 0 - 100.

Print "Blink Offset: " + "My Light" offset

set "My Light" offset to 50

“Falloff” Property

Gets/Sets the falloff for the given lights(s), in seconds.

Print "Falloff: " + "My Light" falloff

set "My Light" falloff to 3