Logic Machine Forum
Use Booleon to send 3 values - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Use Booleon to send 3 values (/showthread.php?tid=1803)



Use Booleon to send 3 values - Tokatubs - 19.12.2018

Hi

I would like to use a booleon to send three values. I am mostly using the FBEditor to create logic. But i cant seem to find the right way to get this solution to work.

Is there some converter of some kind?


RE: Use Booleon to send 3 values - Rauschentofft - 19.12.2018

Hi.

You can use this script to send three values.

Copy and paste in an event based script.
Code:
value = event.getvalue()

if (value == true) then -- true or false
  grp.write('1/1/1', true) -- change group adress and value
  grp.write('1/1/2', 50)
  grp.write('1/1/3', 100)
  grp.write('1/1/4', 255)
else
  grp.write('1/1/1', false)
  grp.write('1/1/2', 0)
  grp.write('1/1/3', 0)
  grp.write('1/1/4', 0)
end