It is not wrong, it is your value that is wrong
The ShapeIndex is 1-based. So the RBC has index 1, the Platelet is 2, and the Testosterone is 3.
But in your Magma, where a Mux is 0-based, the MXSInteger produces blue when the value is 1, and green when the value is 2, and red when the value is 0.
But a value of 0 would pick the 3rd shape from the list (the shapes will cycle by modulo if the ShapeIndex is out of range). So a value of 4 or -2 will pick the first shape again, a value of -1 will pick the second shape… You could add a Clamp operator to the Magma to ensure that any values less than 1 and higher than 3 are clamped to 1 and 3, in case the content of MXSInteger is not guaranteed to be in the range from 1 to 3.
- If the MXSInteger is zero-based out of Particle Flow, then you need to ADD 1 to it before sending it out to ShapeIndex.
- If the MXSInteger is one-based out of Particle Flow, then you need to SUBTRACT 1 before sending it into the Mux’ Selector socket.