View Hatswitch Setup Building Block

The View Hatswitch Setup building block is used to create a value that may control a Virtual Hatswitch building block. It interprets four individual values as directions, then combines those values to create a number that is typically associated with a view hatswitch.

A View Hatswitch Setup building block has four ON/OFF input values and one Number output value. The four input values are interpreted as "Forward" (FWD), "Backward" (BACK), "Left", and "Right". The output value is calculated from the input values using the following rules:

FWDBACKLEFTRIGHTOUTPUT
OFFOFFOFFOFF0
ONOFFOFFOFF1
ONOFFOFFON2
OFFOFFOFFON3
OFFONOFFON4
OFFONOFFOFF5
OFFONONOFF6
OFFOFFONOFF7
ONOFFONOFF8

If two opposite directions are both ON (for example both FWD and BACK), then those two inputs will cancel each other and neither will affect the output value.

A View Hatswitch Setup building block has no properties to configure.