Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hello,

some questions about LUA and ipc.writeLvars()

I have started the lua script read lvars includet in the FSUIPC and also the log function of FSUIPC.

Now i have loaded the FSX PMDG 737 NGX.

Ok, thats the setup.

Now lets take the Button for the left Engine were i can select "GRD","OFF", "cont" and "FLY".

Wen i now turn the knob to the left the LUA Display says "L:ngx_switch_119_a=0", after the first turn to the right "L:ngx_switch_119_a=10" and so on.

Now..how can i set the Button state via ipc.writeLvars ?

I have testet

ipc.writeLvars("L:ngx_switch_119_a",0)

ipc.writeLvars("L:ngx_switch_119_a",10)

and

ipc.writeLvars("ngx_switch_119_a",0)

ipc.writeLvars("ngx_switch_119_a",10)

ipc.writeLvars("ngx_switch_119_a",30)

nothing worked for me.

What did i wrong here?

How can i set the Button position directly ?

Thanks

Matthias

Posted

Hello,

some questions about LUA and ipc.writeLvars()

I have started the lua script read lvars includet in the FSUIPC and also the log function of FSUIPC.

Now i have loaded the FSX PMDG 737 NGX.

Ok, thats the setup.

Now lets take the Button for the left Engine were i can select "GRD","OFF", "cont" and "FLY".

Wen i now turn the knob to the left the LUA Display says "L:ngx_switch_119_a=0", after the first turn to the right "L:ngx_switch_119_a=10" and so on.

Now..how can i set the Button state via ipc.writeLvars ?

I have testet

ipc.writeLvars("L:ngx_switch_119_a",0)

ipc.writeLvars("L:ngx_switch_119_a",10)

and

ipc.writeLvars("ngx_switch_119_a",0)

ipc.writeLvars("ngx_switch_119_a",10)

ipc.writeLvars("ngx_switch_119_a",30)

nothing worked for me.

What did i wrong here?

How can i set the Button position directly ?

Thanks

Matthias

Are the values you read base 10 or base2? Most controls like that have parameters of 0,1,2,3 (00, 01, 10, 11 base 2 ).

Try sending 1, 2 or 3 as the parameter.

I just noticed... the command format is " ipc.writeLvar( ) " remove the"s" from your statements!

Paul

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.