Well if you don’t mind using 13+ global variablex, you can set each one to hold the state of a given controller. Then you set up a rules that when you set the state of a given button to on, you set the variables for the other buttons off.
You then trigger a repeating timer to iterated through the variables turning each one on or off depending on their current statue
Example of translator
Input B0 pp qq
Rules
// Only look for on status, we set off status later
if qq!=127 then exit rules, skip outgoing action
// Only look at controllers of interest
if pp<20 then exit rules, skip outgoing action
if pp>32 then exit rules, skip outgoing action
// Clear existing contents to clear all other channels
ga=0
gb=0
gc=0
…
gn=0
// now set the one on that was on input.
if pp==20 then ga=qq
if pp==21 then gb=qq
…
if pp==32 then gn=qq
// number of iterations
gn=13
Output Timer “Update LEDs” gn times no delay 10ms intervale
Example of a timer “Update LED’s”
You use ga-gm as your 13 variables controlling 20-32 ga=20 gb=21 … gm=32
Your rule would set ga=127 and gb-gm to zero.
The timer would be set up for 13 iterations and on each iteration dump send out the state of that led
You could use a global variable (say gn) to count down. Timer would look something like this
// which variable? 13-1
pp=gn
//Calculate which controller 13=cc32 12=cc31 …
qq=gn+19
// Get the variable value
if pp==13 then xx=gm
if pp==12 then xx=gl
…
if pp==20 then xx=ga
//decrement for next iteration
gn=gn-1
if gb==0 then exit rules, skip outgoing action
Output the controller and value
B0 qq xx
There are other ways to do this but this should get you started. If you don’t like using so many global
variables, check out my posts on bit mapping.