Setting Light Potentiometer variables in MSFS

Help creating logic scripts for Air Manager Instruments

Moderators: russ, Ralph

Post Reply
Message
Author
ylevesque
Posts: 69
Joined: Wed Jan 09, 2019 6:49 pm

Setting Light Potentiometer variables in MSFS

#1 Post by ylevesque »

I want to control values off Light potentiometers variables in MSFS 2020.
Those variables control many panel lights, flood lights and screen brightness, etc.
For example in A320 FBW, the variable LIGHT POTENTIOMETER:88 control the PFD brightness.
I am able to read the value with fs2020_variable_subscribe("LIGHT POTENTIOMETER:88","Percent",pfd_brightness_cb)
Unfortunately, this is a read only variable so fs2020_variable_write("LIGHT POTENTIOMETER:88","Percent",new_value) does not work
If I look to the ModelBehavior code I can see a line:
SET_CODE : 88 (>K:2:LIGHT_POTENTIOMETER_SET)
I tried
fs2020_event("LIGHT_POTENTIOMETER_SET:88",new_value). It does not work

fs2020_event("LIGHT_POTENTIOMETER_SET",88) set the value to 0. So, I am not far. But I cannot set to a specific value.

What is the meaning of :2 in SET_CODE : 88 (>K:2:LIGHT_POTENTIOMETER_SET)?

I hope somebody has an idea on how to set the variables to a specific value?

Yves

Post Reply