Merlin of Mines - Space Engineers

A set of useful scripts for aspiring Space Engineers!

View on GitHub

Timer Block Handler

This block handler lets you control Timer blocks, including triggering them immediately or after a delay.

Default Primitive Properties:

“Enabled” Property

Enables or Disables the given block

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

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

“Power” Property

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

#Turn on
turn on power to "My Timer Block"
power on "My Timer Block"

#Turn off
turn off "My Timer Block"
power off "My Timer Block"

“Trigger” Property

When getting, returns whether the Timer Block is currently counting down. When set to either true or false, triggers the Timer Block immediately.

if "My Timer Block" is triggered
  Print "Timer Block is running"

#Trigger Immediately
trigger "My Timer Block"

“Silence” Property

Gets/Sets whether the timer is silent. Setting this to true disables its audible beep; setting it to false enables the beep.

if "My Timer Block" is silent
  Print "Running Silently"

silence "My Timer Block"

“Delay” Property

Gets/Sets the trigger delay for the Timer Block, in seconds. This does not return the active countdown time (if there is one), it returns the configured delay for the Timer Block.

Print "Timer Delay: " + "My Timer Block" delay

set "My Timer Block" delay to 10 seconds

“Countdown” Property

When retrieving, returns whether the timer is currently counting down to activation.

When setting, will either start or stop the countdown based on the input value.

#Check if counting down
if "My Timer Block" countdown is on
  Print "Timer is ticking..."

#start the countdown
start "My Timer Block" countdown

#Stop the countdown
stop "My Timer Block" countdown