Jump to content
The simFlight Network Forums

wif

new Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by wif

  1. I am at the beginning of lua scripting. Sorry for my question. I did a lot of reading and trying, but without success.

    I have a registered  FUSIPC vers 4.997, FSX:SE and its a Carenado Citation CJ2 aircraft. I'm trying to set the target altitude at 1000 increments.  At the moment, I trigger the file with a button press assignment via FSUIPC.  In the future I will running this with an rotary encoder via mobiflight. I do not clearly understand the parameter. I figured out, e.g. 5000 in the parameter field brings 5000 ft target altitude. In which form or style I have to fill in this value to make the 1000 increments with each button press or have I put the parameter value to the roatary encoder in the mobiflight assigment?

     

     

    I have tried with this code

    function Alt_Presel_inc ()
        a = ipc.readLvar("L:CUSTOM_AP_ALT_VAR_SET_ENGLISH") -- get the state of the Lvar
        ipc.writeUW("66C0", a) -- save the state of the Lvar in the offset 0x66C0
        a = a + 1000 -- add 1000 not sure if this is the right place
        end
        
    event.Lvar("L:CUSTOM_AP_ALT_VAR_SET_ENGLISH", 100, "Alt_Presel_inc") -- monitoring the Lvar

     

    Any advice would be very appreciated.

    Best regards

    Franz

     

     

     

    FSUIPC4.ini Alt_Inc.lua

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