dihoogl.blogg.se

Space engineers progarmable block as timer bock
Space engineers progarmable block as timer bock






space engineers progarmable block as timer bock

The entire execution takes place within the span of a single "update" (i.e., physics update, which occurs at a rate of 60 per in-game second). When the Run action is applied to a PB, the Main() method (of the previously created instance) is executed. On saving of the game, the value of the Storage string (and nothing else) is saved. Except that the Storage member is initialized to the value in the save. In the case of loading a savegame, the above also happens.

space engineers progarmable block as timer bock

The GridTerminalSystem member is initialized and the Storage member is initialized to "".

#Space engineers progarmable block as timer bock code

When you hit "Remember and Exit", the code is compiled and an instance of the class is created. If ( ! Single.For(counter counter < 10 counter++)From what I gather, this is more or less how the game implements it. Count > displayBufferY), 4) ĭebugPrint ( "Line " + line + ": too few parameters. Set Programmable Block screen to 0.4 font size, recommend Monospace font. * Jackrabbit Industries Automation Controller (JRIAC)Ĭonst string BlockPrefix = " " This is useful as it allows it to load new automation tasks without breaking currently running automation tasks.

  • Added a check to see if run, so you can bind a button to "run" the Programmable Block the script is in to force it to reload all blocks.
  • Added 3 new commands, TogglePower, ToggleDoor, and TogglePressure for changing the current state to the opposite in all blocks, doors and vents respectively.
  • Changed ToggleOn and ToggleOff commands to TurnOn and TurnOff.
  • Added sensor events OnDetect and OnLost.
  • Added additional door state events OnClosing and OnOpening.
  • If you don't use this parameter, the controller assumes you want to apply the command to whatever block the event is attached to. Unlike other parameters this one is OPTIONAL, that means you can leave it out. For this parameter you omit the "" prefix when typing it, this is for ease of use. TARGET is what you want to run your command on, simply type it out, spaces and all, the controller is fine with it (mostly because it's the last paramater).

    space engineers progarmable block as timer bock

  • TogglePressure- Switches the pressurize/depressurize state of a vent.
  • TogglePower- Switches the on/off state of a block.
  • ToggleDoor- Switches the open/closed state of a door (opening is treated as open and closing as closed).
  • TurnOff- Toggles the power of a block off.
  • TurnOn- Toggles the power of a block on.
  • Depressurize- Sets a vent to depressurize a room.
  • Pressurize- Sets a vent to pressurize a room.
  • The normal block rules apply to these, if a door is not enabled, then you cannot open or close it, you also cannot close a light, or pressurize a door, the controller will simply ignore nonsense commands like those. Keep in mind that the time may not be exactly what you set, as it depends on how quickly the script runs, your PC/Server and the script load.ĬOMMAND means "DO THIS", there are currently 6 commands. TIME is simply the time in seconds, you can use decimals if you wnat, so "7" or "3.2213" are both fine.
  • OnLost- When the sensor becomes inactive.
  • OnDetect- When the sensor becomes active.
  • OnClosing- When the door starts closing.
  • OnOpening- When the door starts opening.
  • " dOoR a2" Custom Data (outer door) oncloSE 0 TURNoffĪnd it would work exactly the same Command SyntaxĮVENT means "when this happens", there are several events available in the automation script. Keep in mind that none of these are case sensative, so you could use code that looks like Place a button that simply closes the opposite door to have a "Cycle Airlock" button, never waste oxygen again! You can have any number of airlocks and this single block can handle them all (assuming they are named differently). " Door A2" Custom Data (outer door) OnClose 0 TurnOff " Door A1" Custom Data (inner door) OnClose 0 TurnOff Internal sliding door named " Door A1"Įxternal sliding door named " Door A2" Jackrabbit Industries Automation Controller (JRIAC)








    Space engineers progarmable block as timer bock