Actions

Logic Toggle

From Unofficial Stationeers Wiki

Revision as of 04:23, 4 August 2018 by Patistar (talk | contribs) (Fix image displayed as thumb)


Logic Toggle

Author: Patistar#8335
Stationeers Version: 0.1.1567.7381
Number of Components: 2

Design

Logic Toggle.png

  • Enable Value Writer: IN: Button, OUT: Write Value, VAR: On
  • Toggle Compare: 1: Toggle Value, 2: Logic 1, OUT: NotEqual
  • Write Value: IN: Toggle Compare, OUT: Toggle Value, VAR: Settings
  • Logic 1: VALUE: 1

The Toggle Compare will compare the Toggle Value with 1. If the Toggle Value is 1, the Toggle Compare will output 0. If the Toggle Value is 0, the Toggle Compare will output 1. The Write Value writes output of the Toggle Compare to the Toggle Value Memory. As we do not want that value to be continuously changed, we are going to turn the Write Value component off. The Enable Value Writer will only turn the Write Value component on, while the Button is pressed. This will change the Toggle Value once, and therefore flip it either from 1 to 0 or from 0 to 1.

Notes

  • If you want to control any component with this circuit, just use any Logic Writer (Batch, Slot, ...) and set the Toggle Value as your Input.
  • If you want your toggle to work with multiple Buttons, you need to replace the Button in the circuit above with a Batch Reader and set it to read all your Buttons.
  • You could also replace the Logic Compare with a Logic Math and set it to always calculate 1 - Toggle Value. 1: Logic 1, 2:' Toggle Value, OUT: Subtract. For this setup you must to make sure your Toggle Value is initially either set to zero or one.