21 lines
367 B
Lua
21 lines
367 B
Lua
local tv = get_trigger_variable(1)
|
|
if tv == nil then return end
|
|
|
|
local v = tv.integer
|
|
|
|
if v < 0 then v = 0 end
|
|
if v > 100 then v = 100 end
|
|
|
|
local level = v / 100.0
|
|
|
|
local grp = nil
|
|
local ok
|
|
ok, grp = pcall(get_group, 0)
|
|
if not ok or grp == nil then
|
|
ok, grp = pcall(get_group, 'All Fixtures')
|
|
end
|
|
|
|
if ok and grp ~= nil then
|
|
grp:set_master_intensity(level)
|
|
end
|