12.03.2022, 21:17
(27.08.2021, 07:37)admin Wrote: Create a resident script with sleep time set to 0 and set the script name to light scene
Code:step = 10 delay = 0.2 addrs = { '32/1/15', '32/1/16', '32/1/17' } for _, addr in ipairs(addrs) do for value = 0, 100, step do grp.write(addr, value, dt.scale) os.sleep(delay) end end for i = #addrs, 1, -1 do addr = addrs[ i ] for value = (100 - step), 0, -step do grp.write(addr, value, dt.scale) os.sleep(delay) end end
Then you can create an event script (1-bit object) which can be used to turn the scene on and off:
Code:value = event.getvalue() if value then script.enable('light scene') else script.disable('light scene') end
How can I get this script to dim the first groupadress 0-100%, and at the same time thr first groupadres dims from 100-0%, the second goupadress dims from 0-100%?