Space Engineers

Space Engineers

Cruise Control
 This topic has been pinned, so it's probably important
ZerothAngel  [developer] 16 Apr, 2023 @ 3:39pm
Managing LCD panel output in ZerothAngel's Scripts
Since around June of 2022, many of my scripts (including this one, Cruise Control) support basic text output to any LCD panel -- including the displays on cockpits, flight seats, and programmable blocks.

Basically, the script will echo whatever you see on the terminal screen to an LCD panel of your choice.

By default and without any configuration, the script will output to the programmable block's display. Just set the display to "Text and Images" and you'll be all set.

Outputting to a different LCD

This is a bit complex, but it was one way I found that granted maximum flexibility.

First, pick a group name. I usually go with "ScriptOut" but it can be any name.

Next, select the LCD panel/cockpit/whatever and create a group named "ScriptOut:<display #>" where <display #> is the ID of the LCD panel. Yes, you can include multiple blocks.

If there is only one LCD panel, then <display #> should always be 0 (zero). And in this case, you can just omit the colon and <display #>, i.e. just set the group name to "ScriptOut"

When there are multiple LCD panels, which is often the case in cockpits and flight seats and such, look at the block in the terminal where it lets you configure each display individually. They are listed in order, starting from 0.

So the "Top left screen" on the large grid cockpit, which is the second display, would be display #1. For this, we would create the group "ScriptOut:1" around the cockpit.

Once the group is created, make sure the content for each display is set to "Text and Images"

And one final point: You can have multiple groups with the same name, as long as they target a different <display #>. So you can have "ScriptOut" and "ScriptOut:1" groups if you wanted to target multiple blocks with different display IDs.

Configuring the Script

Once your group(s) have been created, you have to tell the script the name of your group.

On the programmable block with the script, hit "Custom Data"

And then enter:

outputGroup ScriptOut

(replace "ScriptOut" with whatever group name you chose)

Be sure to recompile so the new custom data will be picked up.

And that's it!

Many of my scripts now support this feature and if you see "paneloutput" in the first few lines, then the script supports it.