Logic Tutorial: 4-state Button

From Kogama Wiki
Jump to: navigation, search

This logic tutorial will show you how to create a button that alternates between 4 outputs. Only one of the four outputs is active at a time. Required Logic Cubes:

Construction[edit | edit source]

To construct the system, recreate the logic circuit as seen in the image. All important connections and boxes are in view; you may ignore any wires that go off-screen. 4StateButton2.png

The cubes have been highlighted and numbered for convenience. Cubes outlined in orange are negate boxes, cubes outlined in purple are toggle boxes, cubes outlined in green are AND boxes, and the cubes outlined in black are the outputs.

Input Cube: Connect the negate cube marked "Input" to a pressure plate or target trigger.
Numbered Cubes: The cubes numbered 1-4 provide the system's output. The cube marked #1 is the first to be activated by the system, the cube marked #2 is the second to be activated, and so on.
Outputs: In the example image, the 4 output cubes are skyboxes. Each time the system is activated (by, say, a pressure plate), a different skybox is turned on. You can replace the skyboxes with other cubes to fit your game's needs.

Usage[edit | edit source]

This system allows for a pressure plate or target trigger to alternate between 4 different outputs, with only one output active at a time. This 4-state system can be used for a variety of things:

  • A button that switches between 4 different skyboxes (as seen in the image)
  • A button that activates 4 different model enablers, with only one model visible at a time (or only one model hidden at a time)
  • A simple scoreboard or counter that ranges from 1-4 or 0-3 (depending on the text boxes you use)