Jump to content
The simFlight Network Forums

sLYFa

new Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by sLYFa

  1. Thank you for your feedback!

    On 12/28/2018 at 11:42 AM, spokes2112 said:

    a run once, self killing lua with possibly 200+ commands!?! That is a lot of iterations to run through each time an assigned button is pressed.

    Thats what I was thinking too. The script is quite large indeed (1000+ lines). However, I tried cropping the script to only four commands but the result was the same.

    On 12/29/2018 at 5:26 PM, John Dowson said:

    It would be more efficient to have the lua auto-started (and compiled!) and activated on an event flag.

    I am not sure how to do that. I believed that adding the lua to the autostart section in the .ini would do that. But again, this doesnt seem to make any difference.

    I am going to rewrite the script according to spokes´ suggestion and see if that helps.

  2. I am unfortunetly unable to post it as I am only allowed to upload 10kb. But here is an excerpt:

     

    --------------------------------------------

    ---- Variables
    --------------------------------------------
        Sweep_R1    = "L:tomcat_bomb_mode"
        Sweep_R2    = "L:tomcat_bomb_switch"
        Man_Sweep    = "L:tomcat_sweep_mode"
        Sweep_Cover    = "L:tomcat_wingsweep_cover"
        Over_Sweep     = "L:Sweep_Oversweep_flag"
        Emerg_Auto    = "L:Over_to_Auto"

    --------------------------------------------
    ---- Scripts
    --------------------------------------------


    -- Sweep Rocker to Auto Mode
    if ipcPARAM == 1 then
        ipc.writeLvar(Sweep_R1, 0)
        ipc.writeLvar(Sweep_R2, 0)    
    end
    -- Sweep Rocker to Bomb Mode
    if ipcPARAM == 2 then
        ipc.writeLvar(Sweep_R1, 2)
        ipc.writeLvar(Sweep_R2, 2)    
    end
    -- Sweep Rocker to Manual FWD
    if ipcPARAM == 3 then
        ipc.writeLvar(Man_Sweep, 1)
        ipc.writeLvar(Sweep_R2, 1)    
    end
    -- Sweep Rocker to Manual AFT
    if ipcPARAM == 4 then
        ipc.writeLvar(Man_Sweep, -1)
        ipc.writeLvar(Sweep_R2, 1)    
    end
    -- Sweep Rocker to Center
    if ipcPARAM == 5 then
        ipc.writeLvar(Man_Sweep, 0)
        ipc.writeLvar(Sweep_R2, 1)    
    end
    -- Emergency Sweep Cover Toggle
    if ipcPARAM == 6 then
        tog = 0
        SCov = ipc.readLvar(Sweep_Cover)
        if SCov == 0 then
            tog = 1
        end
        ipc.writeLvar(Sweep_Cover, tog)    
    end
    -- Oversweep Toggle
    if ipcPARAM == 7 then
        tog = 0
        OSw = ipc.readLvar(Over_Sweep)
        if OSw == 0 then
            tog = 1
        end
        ipc.writeLvar(Over_Sweep, tog)    
    end

     

     

  3. Hi,

    I am using regisitered FSUIPC 5.15 with p3d 4.4 to control several custom functions in aerosofts F-14X using the lua script provided with that aircraft. However, when I depress a button on my joystick that is associated with a lua command, the sim freezes for about half a second. This happens on both my VPC stick and WH throttle. Besides the F-14X I am using ORBX FTX Global and NA Landclass and VRS Tacpack. This also happens in FSX:SE with FSUIPC4 und the same conditions. I already tried adding the F-14 lua script to the autoload function but this didn't help. Any ideas are much appreciated. Ini and Log file are attached.

    FSUIPC5.log

    FSUIPC5.ini

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