Multistate image with multiple points input
-
I need a light that outputs 4 different colors. I have 4 binary inputs that will be in different combinations. How would I go about doing so? I tried searching with no luck.
Basically, A. valve opening, B. closing, C. not fully open, D. not fully closed.I need output when following combination is true.
C.
D.
ACD.
BC.
BCD.
AD.Thanks in advance.
-
A multi-state meta data point would probably be your easiest option.
Add the 4 binary data points as context points. The script would look something like this -
var a = contextA.value << 0; var b = contextB.value << 1; var c = contextC.value << 2; var d = contextD.value << 3; return a | b | c | d;