Space Engineers

Space Engineers

Nincs elegendő értékelés
Connector Guard
   
Díjazás
Kedvenc
Kedvenc
Törlés
Fájlméret:
Közzétéve:
610.336 KB
2022. nov. 15., 15:21
1 változásjegyzék ( megnézés )

Feliratkozás a letöltéshez
Connector Guard

Leírás
Script to monitor connectors and run timer blocks when the connector is being connected/disconnected/approached, by Ich_73. View on GitHub[github.com].

v1.0 (initial release)

Prerequisites
  • Experimental mode must be enabled!
  • Build a programmable block and load this script

Instructions
  • Build a connector and 1-3 timer blocks (on the same construction as the programmable block)
  • In the custom data of the connector...
    • ... write "@ConnectorGuard" in the first line
    • (optional) ... add a line with "onConnect: <timer block>" to specify the timer block to run when the connector is being connected
    • (optional) ... add a line with "onDisconnect: <timer block>" to specify the timer block to run when the connector is being disconnected
    • (optional) ... add a line with "onApproach: <timer block>" to specify the timer block to run when the connector can connect (but is not yet connected) and was previously disconnected
  • In each timer block...
    • ... set the delay to 00:00:01
    • ... configure the actions to be executed when the timer block is being run
Note that you can specify any combination of onConnect, onDisconnect and onApproach, in any order. You can also use the same timer block for multiple actions.

Examples
A connector that runs "Timer Block 1" on connect and "Timer Block 2" on disconnect has custom data:
@ConnectorGuard onConnect: Timer Block 1 onDisconnect: Timer Block 2

A connector that runs "Timer Block 3" on connect and approach has custom data:
@ConnectorGuard onApproach: Timer Block 3 onConnect: Timer Block 3