Timer Block

From Space Engineers Wiki
Jump to navigation Jump to search
Timer Block
Icon Block Timer Block.png

Category: Functional
Fits small grid
Mass: 30.2 kg
PCU: 25
Size: 1x1x1
Time to Build: 4 sec

Fits large grid
Mass: 259.0 kg
PCU: 25
Size: 1x1x1
Time to Build: 10 sec

Data Controls: [edit] [purge] (?)

The Icon Block Timer Block.png Timer Block is a block useful for automation of recurring actions, such as docking procedures or air lock cycles. Use the Block to remember a series of button pushes for you and replay them later. Timers are much easier to set up than a Programmable Block because the require no scripting knowledge.

Tip: To understand timers, think of actions as "songs" and Timer blocks as "playlists". You make playlists for special occasions and choose to start, stop, pause, or loop songs.

Usage

You set up the Delay time, looping behaviour, and actions using the grid's Control Panel Screen, or through the keypad on the front side of the large-grid Timer.

  1. Put your list of actions into the Timer block.
  2. Start the timer.
  3. The Timer waits a predetermined amount of time
  4. The Timer triggers the actions.
Different ways to use timer blocks
Automation: Timers can play, wait&play, and loop groups of block actions, similar to how playlists play songs.

Possible Triggers

You start Timer blocks either manually by clicking a button in their Control Panel Screen or you set up certain other blocks to trigger the Timer:

Possible Actions

Timers can trigger almost any block action the player can do through the Tool Bar.

Examples:

  • Extending or retracting pistons, turning rotors and hinges, opening or closing doors
  • Switching on or off lights / thrusters / power / beacon / handbrake / turrets...
  • Changing behaviours or targets of Automaton blocks, changing conditions of an Event Controller
  • (Dis)arming a Warhead, (de)pressurizing a room's Air Vent, (de)activating grinder/welder/drill blocks, (un)locking connectors or landing gear
  • Highlighting a block on the HUD (escape pods, emergency exits, block you are looking for to repair...)
  • Trigger a Broadcast Controller to send a status message in the chat.
  • Trigger an Action Relay on a remote grid.

... and so on.

You can also select available actions from blocks on subgrids that are connected through a connector, and the respective actions are then only executed when the grid is connected.

When NOT to use Timers

Timer blocks cannot perform any non-Control Panel Screen actions, this means:

Neither can Timers buy anything from a Store, nor trade, nor emote, nor push physical buttons, nor save new GPS locations, nor perform similar player actions.

Usage: Play a group of actions

First, decide on a trigger (e.g. build a button panel), and build your Timer block. Each Timer block executes a group of actions that belong together and should always happen together.

How many timer blocks will I need?

Answer: Lots. :-) One for each set of actions that happen together. If sets of actions are mutually exclusive, or if they only happen together some of the time, or if they must have pauses between them, or if one action must wait for another to complete, then you must build separate Timer blocks for them!

  1. Open the Control Panel Screen.
  2. Go to the Trigger (the Sensor, Event Controller, Button Panel, etc.) controls and click Set up Actions.
  3. Click the Timer block and select “Start” from the action menu.
  4. Press ESCAPE key to return to the Control Panel Screen.
  5. Go to the Timer block controls and click Set up Actions.
  6. Click block icons to select actions, and assign them to slots. You can assign each action only once per toolbar.

What if I want to add several of the same action?

I want to 3X "increase propulsion override", but it doesn't let me add it three times?

Answer: Remember that each Timer block can store 81 (nine times nine) actions! Press ctrl+1 to ctrl+9 to select another one of the nine toolbars. You can assign the same "increase propulsion override" action once to each of the nine toolbars. All toolbars will be triggered together. And if you create multiple groups containing the same block, you can even add actions for each group.

When to use a Group and when a Timer?

I can group blocks in the Control Panel Screen and trigger an action on them, or I can list these actions in a Timer. What's the difference?

Group names are not unique. This is relevant when you have massproduced multiple ships from the same blueprint (same ship name, same group names, same block names) and they are docked in the same hangar: Group actions will trigger in all docked ships that are using the same group name.

So for non-unique ships (sich as drones or PBW), use Timers to group actions safely.

Usage: Pause and Play actions

All the actions run inside a timer don't wait for each other's completion. If you are automating a sequence of longer actions, you must enforce pauses in between. Examples: Playing two sound alerts one after the other without overlapping; or a docking sequence that waits for the hangar door to open; or an airlock cycle that waits for the room to depressurise.

  1. Split up the time-sensitive actions and put them into separate Timer blocks.
  2. Configure the Delay of the second timer to wait for the first timer to finish.
  3. Make the first timer start the second timer.
  4. Make the second timer start the third, and so on.

The Delay format is read as hours:minutes:seconds. The start-up delay of a timer block can be set to any value between 1 second (0:00:01) and 1 hour (1:00:00).

Note that Timers are not accurate with the timings of delays, so rather add a little extra time. When you control something very time sensitive (like the joints of a walker), don't trust Timer Blocks to coordinate punctually by the second, and they certainly cannot handle any timings of less than a second. A script in a Programmable Block is more suitable when you need precision.

Also Timers just literally wait the number of seconds you tell them, they don't confirm whether the previous action has truly completed or not -- e.g. if a door is blocked instead of closed, or a room cannot be pressurised because your tanks are empty, a Timer sequence may get messed up.

Usage: Loop actions

Do you manually perform actions that always repeat in the same way, for example, automated shuttle (un)docking sequences, restocking various ammo on patrolling drones, progressing or resetting the 3D Printer, walking sequences of Mecha legs? Are you building mini-games with continuously moving obstacles or traps, or similar?

Just like any other action, you can set up a Timer to start (or stop!) another Timer -- even itself. That causes a loop. For each set of actions that you want to repeat, set up one separate Timer and its Delay. Then you set up the last action of the last Timer to start the first Timer again, and the actions will loop.

Can I loop the loops?

You can also build complex loops: Use one conductor Timer solely to start and stop several other Timers, add a long Delay, and as its last action, make it re-start itself.

When ever the timings start feeling too complicated to keep track of, it's recommended to simply draw some boxes with arrows to get your head around the delays, order, and groupings.

Tip: Trigger the Stop action on all looping blocks when you want to end a loop.

Should I Reuse Triggers and Actions?

You are not restricted to one trigger per one set of actions!

One Trigger can start multiple Timers, even though there is only one trigger slot: Just build a “conductor” Timer that starts all the other Timers, and make the trigger start the conductor!

Similarly, one Timer can be started by several triggers. For example, in a timed airlock cycle, you can have a manual button panel that starts the Timer, and also an automatic sensor that starts the same Timer.

Usage: Randomizer

In this scenario, you want an event to trigger in only 50% of the time. The dice-roll is initiated by a player pressing a button (you can replace that by any block that detects a player doing anything).

  1. Build a Timer and name it e.g. SurpriseTimer.
    1. Click Set up Actions and configure the random event here (e.g. arm and ignite a warhead).
  2. Build a Timer and name it e.g. ToggleTimer.
    1. Set its Delay to e.g. 3 sec.
    2. Click Set up Action. As first action, configure ToggleTimer to switch the SurpriseTimer block on/off.
    3. As second action, make the ToggleTimer Run itself. (loop)
  3. Build a Sensor that detects a random event, e.g. a player entering this room.
    1. Configure its action to switch off ToggleTimer.
      You now have a 50/50 chance that SurpriseTimer is on or off.
  4. Build a button labelled Surprise...
    1. Configure its action to Run SurpriseTimer.
    • If SurpriseTimer was on, the "surprise" happens.
    • If SurpriseTimer was off, nothing happens.

Troubleshooting

Auditory Troubleshooting: Beeps

A Timer Block has a setting to run either silently or to beep every time when triggered. Additionally, if you have set up a Delay, a non-silent Timer beeps for every second of the countdown. The sound is only audible in close proximity.

Which setting should you choose?

  • A silent timer is less annoying when it loops often. Silence is also preferred when actions are supposed to happen without attracting the attention of players.
  • Deactivating the Silent option can be useful, on the other hand, while setting it up or while troubleshooting, to get feedback. You can also use auditory feedback when you purposely want to alert other players to expect an automated action — reminds them to wait, for example, for an airlock sequence or a docking manoeuvre to complete.

Visual Troubleshooting: Colours

The Timer block changes colour while it's running to show you its stages:

  • Green means the Timer is ready and powered.
  • During the Delay countdown, it alternates between cyan and blue.
  • Red means it's been switched off or has no power.

Manual Troubleshooting

In the control panel, you can trigger the block manually.

  • Trigger Now -- Don't wait for the delay and play the actions.
  • Start -- Count down the delay and then play the actions.
  • Stop -- Stop the running actions.

This is the same start/stop action that can also be triggered remotely by another Timer block. Manual starting and stopping timers is useful during set-up and troubleshooting. If a block in a mechanical sequence gets damaged and stops moving, coordinated movements go out of sync; after the block has been repaired, all timers need to be stopped, reset, and restarted in the right order.

It can be helpful to set up a Timer that runs a reset sequence for a complex mechanism, so that you can quickly bring it back into a reliable start state for your loop.

Construction

If progression is enabled, build any light first to unlock timers.

Timer blocks are cheap and can be built and used early on. You can build them on small grid and large grid, and they they have mount points on all six sides. When the block is switched on, it requires 0.1W of power, which is dismissible, as it is almost nothing -- a small battery can power 500 000 Timers for an hour.

The block has a coloured side that blinks while it’s active. You can rotate and purposefully hide that side of the blocks, or place a whole bunch of them in plain sight (perhaps with a transparent LCD panel as label) for a techy “blinking-lights control room” look.

Recipe

Icon Block Timer Block.png Timer Block
ComponentLarge Ship/Station
Required
Large Ship/Station
Optional
Small Ship
Required
Small Ship
Optional
Icon Item Interior Plate.png Interior Plate62
Icon Item Construction Comp..png Construction Comp.201021
Icon Item Computer.png Computer51



Functional Blocks