Logic Gadgets: Selector

 

Icon
Name of gadget Selector
Section Logic & Processing
Number of Tweak pages 1
Author LadylexUK, QuietlyWrong
Last updated 22 Feb 2019 [Beta]

Description

This gadget allows you to have multiple outputs from a list, menu or set, only one of which can be activated at a time. The selector can have up to 10 outputs that can be played in sequence, or activated by inputs (such as a randomiser, a button press, a calculation, etc.). You might use this to trigger each phase of a boss fight in turn, advancing the selector output each time the boss gets knocked back.

By default, the output ports from the selector output a true or false signal, but there is an optional toggle that allows the full value of the input wire to be passed through to the corresponding output. If ongoing signals are sent to multiple inputs at the same time, only one output is allowed, in which case the selector will always pick the activated input port closest to the power input.

This selective exclusion behaviour alone is very useful – for example you might have several overlapping spherical trigger zones, each of which triggers a camera. With each one connected through the selector, only one camera can be activated at a time, and you can wire them in order of priority.

Example Tutorial (adapted from Media Molecule)

  1. Stamp 3 separate sculpture shapes in red, yellow and green
  2. Place a timer
  3. Place a selector
  4. Tweak the selector to have 3 ports
  5. Connect the output of port A to the glow input of the red shape, port B to the glow input of the yellow shape, and C to the green.
  6. Tweak the timer. Connect timer finished (pulse) to reset timer to make a loop.
  7. Connect timer finished (pulse) to move to next output on the selector
  8. Use start time.
  9. You should now have a traffic light.

Tweak Menus

  1. No. of Ports
    1a. Input
    1b. Output
  2. Input/Output Ports
    2a. Input
    2b. Output
  3. Move to Next Output
    3a. Input
  4. Move to Previous Output
    4a. Input
  5. Passthrough
    5a. Input
    5b. Output
  6. Currently selected
    6a. Input
    7a. Ouput
  7. Power
  1. No. of Ports
    Choose how many input/output ports there will be here. There can be any number from 2 to 10 and these are activated in strict sequence from top to bottom, A to J.
  2. Selection Ports
    You can have up to 10 selections labelled A-J and (for the purpose of the “Currently Selected” gizmo) numbered 0-9. Wire anything to the output socket so that when that that particular selection port is activated, the signal goes out through that output port. An input to the input socket can be used to force that port’s selection and to provide a signal that will be passed through to the output wire, if “Passthrough” is active.
  3. Move to Next Output
    This activates the selection which is the next in the list from the current one – A to B to C to D – and so on. When it gets to the end of the list it goes back to the start e.g. J to A (in the case that J is the last port).
  4. Move to Previous Output
    This activates the selection which is previous in the list to the current one – D to C to B to A – and so on. When it gets to the beginning of the list it goes back to the end e.g. A to J (if J is the last port).
  5. Passthrough
    By default, the selector gadget outputs a true (on, 1) signal from its activated output. When Passthrough is activated, the input value of the actve port will be passed directly instead. All inactive ports output a false (off, 0) signal regardless of their current input value.
  6. Currently selected
    Input a value from 0 to 9 (though it must be no more than the number of active ports) into this gizmo to force the corresponding port to be selected (0=A, 1=B, etc). The output provides a numeric signal representing the currently selected item (e.g. J=9).
  7. Power
    This is where you turn the gadget on/off

Lex Tips

The selector is a very useful gadget for creating menus and other UI elements. It is also the main gadget in my Jukebox tutorial.

Useful Tutorials

Beginners guide to the Selector gadget

Advertisements

Comments and Feedback

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create a free website or blog at WordPress.com.

Up ↑

%d bloggers like this: