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)
- Stamp 3 separate sculpture shapes in red, yellow and green
- Place a timer
- Place a selector
- Tweak the selector to have 3 ports
- 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.
- Tweak the timer. Connect timer finished (pulse) to reset timer to make a loop.
- Connect timer finished (pulse) to move to next output on the selector
- Use start time.
- You should now have a traffic light.
Tweak Menus
![]() |
|
- 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. - 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. - 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). - 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). - 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. - 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). - 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.
Comments and Feedback