Skip to content

Setting up in game controls

Gabor Barat edited this page Nov 5, 2020 · 1 revision

To understand the deployment of GridOS, which is normally a prerequisite of running it, see Deploying the script.

Simple facts of the system:

  • GridOS uses three navigation commands: Up, Down, and Select.
  • You use these commands to navigate screen content.
    • This requires at least one screen to be added to GridOS.
  • The commands are sent via programmable block run parameters.
    • This requires you to set these up in a cockpit or button panel.
    • You should be able to see the screen while operating the commands.
    • This makes it ideal to set GridOS up in:
      • A built-in cockpit display, or in
      • An LCD panel placed directly in front of a cockpit.
  • The commands run in the context of a display, and GridOS supports multiple displays.
    • This means the commands have to be prefixed with the ID of the display.
    • GridOS uses Lcd<number> prefix, where number starts from 1.
    • Therefore, the commands for the first display are:
      • Lcd1Up
      • Lcd1Down
      • Lcd1Select

Setup steps

  • Load the GridOS script into a Programmable Block.
  • Add an LCD to the system. For this you have two options:
    • Via code:
      • gridOS.RegisterTextSurface(<name of surface>)
      • You should do this once, when instantiating GridOS in Program(). Not in Main().
    • Via configuration:
      • GridOS has a built-in command (run argument) for adding LCD, AddLcd, which uses the following parameter(s):
        • Text Surface name, for adding LCD panels that are themselves text surfaces.
          • Example run argument: AddLcd TextPanel
        • Text Surface Provider name, followed by a number, for adding a screen built into e.g. cockpits.
          • Example run argument: AddLcd Industrial Cockpit 1
      • Additionally, GridOS currently supports running each line of the programmable block's CustomData as commands.
        • This means that you can simply write e.g. AddLcd TextPanel into the Custom Data field, and GridOS should add that screen at each startup or recompile.
        • You can add multiple displays by placing multiple lines of commands into Custom Data.
  • Set up the Up navigation command by dragging the programmable block into a hotbar, and typing in Lcd1Up as the argument.
  • Set up the Down navigation command by dragging the programmable block into a hotbar, and typing in Lcd1Down as the argument.
  • Set up the Select navigation command by dragging the programmable block into a hotbar, and typing in Lcd1Select as the argument.
Clone this wiki locally