Code: Select all
function callback(position)
log(position)
slider_set_position(slider_id, position)
if (position > 0.9 or position < 0.1) then
xpl_dataref_write("sim/cockpit2/switches/rotor_brake","INT",fif(position > 0.9,1,0))
end
end
slider_id = slider_add_ver(nil, 0, 0, 0, 1000, "handle.png", 70, 150, callback)
xpl_dataref_subscribe("sim/cockpit2/switches/rotor_brake", "INT", callback)
What am I missing ?