maybe somebody can help me with this. I have a panel with a panel script:
Code: Select all
local THIS_PANEL = 1
local gGroup = group_add()
function AddInstrument(name, uuid, offset)
group_obj_add(gGroup, instrument_get(uuid, offset))
end
AddInstrument("Flight Control", "2fa3c344-3e29-444d-8966-a146d3147619")
AddInstrument("Fuel Pump Switches", "5f3fdf98-cf3f-47de-b7b5-9b4e13175dc9")
AddInstrument("Standby Power", "518ebdb0-4a93-4477-01bd-514db3230904")
AddInstrument("Generator Switches", "3172aa53-47b5-415e-3366-878815a98a49")
AddInstrument("Pitot and Window Heat", "62f80aa5-b789-4ac3-3963-44fbce630aaf")
AddInstrument("Anti-Ice", "429f27b5-848e-4e9d-b27b-5d77ffa9a720")
AddInstrument("Hydraulics Switches", "fe61bfa7-21f8-4b7e-a4d3-045a198707cf")
AddInstrument("Doors", "283b8204-1550-4770-313b-9591e7ce92b7")
AddInstrument("Bleed", "94fa5175-840e-47c1-2c74-651487865d74")
visible(gGroup, false)
si_variable_subscribe("sivar_activate_panel", "INT", function(v) log("selected: "..v); visible(gGroup, v==THIS_PANEL) end)
log("I'm running happily")
Why is that?
Thank you
Detlef