19.07.2024, 10:35
Create virtual objects that will contain the selected modes. Use an addressing scheme that allows to easily calculate the output object address. For example output is 1/2/3 and mode is 32/2/3. Assign a common tag to all mode objects.
Event script example where event value is the selected mode. Only objects where the mode is the same as the event value are affected.
Event script example where event value is the selected mode. Only objects where the mode is the same as the event value are affected.
Code:
value = event.getvalue()
objects = grp.tag('mode')
for _, object in ipairs(objects) do
if object.value == value then
output = object.address:gsub('^32/', '1/')
grp.checkwrite(output, 123)
os.sleep(0.1)
end
end