04-06-2018 08:52 AM
The code can determine what array index is being clicked on.
How can I make the Led to also light up, and all other leds go out?
Solved! Go to Solution.
04-06-2018 09:12 AM
I'd recommend switching to a shift register instead of a local variable, but you don't absolutely have to.
Use a FOR loop and a Bundle by Name terminal:
04-06-2018 09:20 AM
That is exactly what I wanted it to do.
Thanks for the help.
04-06-2018 11:20 AM
In addition, you should really get rid of that "swarm" of local variables. All data should be carried in a shift register. I assume the array of clusters is also a control, so its terminal would belong in a value change event for it. If several events modify the data, you can write to a single local variable e.g. as follows.
Of course if only one (or none) boolean can be on at any give time and the array is large, it might be more efficient to remember the previous boolean (in a shift register). Now you only need to write two instead of all (unset old, set new).