Jump to content
The simFlight Network Forums
Sign in to follow this  
STF-DIR

LUA ipc.writeLvars question

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • 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.