Jump to content
Sign in to follow this  
h512243512

ENG MATER SWITCH FOR FSL320

Recommended Posts

HELLO i just bought aao,i want to assign eng master swich on and off to my console  just like linda does, but there are no scripts for Fsl320 online

is there anyway to download xml for fsl320, or can i convert  linda's lua to aao' xml

this is linda' s lua ,  could i transfer this to xml ???

-- $$ Engine 1 Master Switch

function VC_PED_ENG_1_MSTR_Switch_on ()
    if ipc.readLvar("VC_PED_ENG_1_MSTR_Switch") < 30 then
        ipc.control(FSL, 78243) -- lift v.244+ (v.243- 78187) 
        _sleep(400,700)
        ipc.control(FSL, 78242) -- move v.244+ (v.243- 78186) 
        _sleep(400,700)
        ipc.control(FSL, 78245) -- down v.244+ (v.243- 78189) 
    end
end

function VC_PED_ENG_1_MSTR_Switch_off ()
    if ipc.readLvar("VC_PED_ENG_1_MSTR_Switch") > 0 then
        ipc.control(FSL, 78243) -- lift v.244+ (v.243- 78187) 
        _sleep(400,700)
        ipc.control(FSL, 78242) -- move v.244+ (v.243- 78186) 
        _sleep(400,700)
        ipc.control(FSL, 78245) -- down v.244+ (v.243- 78189) 
    end
end

function VC_PED_ENG_1_MSTR_Switch_toggle()
    if ipc.readLvar("VC_PED_ENG_1_MSTR_Switch") < 30 then
        VC_PED_ENG_1_MSTR_Switch_on()
    else
        VC_PED_ENG_1_MSTR_Switch_off()
    end
end

-- $$ Engine 2 Master Switch

function VC_PED_ENG_2_MSTR_Switch_on ()
    if ipc.readLvar("VC_PED_ENG_2_MSTR_Switch") < 30 then
        ipc.control(FSL, 78248) -- lift v.244+ (v.243- 78192) 
        _sleep(400,700)
        ipc.control(FSL, 78247) -- move v.244+ (v.243- 78191) 
        _sleep(400,700)
        ipc.control(FSL, 78250) -- down v.244+ (v.243- 78194) 
    end
end

function VC_PED_ENG_2_MSTR_Switch_off ()
    if ipc.readLvar("VC_PED_ENG_2_MSTR_Switch") > 0 then
        ipc.control(FSL, 78248) -- lift v.244+ (v.243- 78192) 
        _sleep(400,700)
        ipc.control(FSL, 78247) -- move v.244+ (v.243- 78191) 
        _sleep(400,700)
        ipc.control(FSL, 78250) -- down v.244+ (v.243- 78194) 
    end
end

function VC_PED_ENG_2_MSTR_Switch_toggle()
    if ipc.readLvar("VC_PED_ENG_2_MSTR_Switch") < 30 then
        VC_PED_ENG_2_MSTR_Switch_on()
    else
        VC_PED_ENG_2_MSTR_Switch_off()
    end
 

Share this post


Link to post
Share on other sites

To my best knowledge, FS Labs uses the (>K:ROTOR_BRAKE) event for their "API". There is no official documentation that I know of. Google "fslabs rotor brake"

On 3/3/2024 at 3:10 PM, h512243512 said:

function VC_PED_ENG_1_MSTR_Switch_on ()
    if ipc.readLvar("VC_PED_ENG_1_MSTR_Switch") < 30 then
        ipc.control(FSL, 78243) -- lift v.244+ (v.243- 78187) 
        _sleep(400,700)
        ipc.control(FSL, 78242) -- move v.244+ (v.243- 78186) 
        _sleep(400,700)
        ipc.control(FSL, 78245) -- down v.244+ (v.243- 78189) 
    end
end

would probably translate as

(L:VC_PED_ENG_1_MSTR_Switch, Number) 30 < if{ 78243 (>K:ROTOR_BRAKE) (WAIT:400) 78242 (>K:ROTOR_BRAKE) (WAIT:400) 78245 (>K:ROTOR_BRAKE) }

But I have no idea what any of these codes do or why the LVar has to be queried this way.


LORBY-SI

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...