Recently we have seen a lot of codes used to unlock our products being offered for discounted prices. Almost all of them are bought using stolen credit cards. These codes will all be blocked by our systems and you will have to try to get your money back from the seller, we are unable to assist in these matters. Do be very careful when you see a deal that is almost too good to be true, it probably is too good to be true.

Jump to content
Sign in to follow this  
rowcoach

Landing and Taxi Lights Macros

Recommended Posts

Good evening. 

 

I’m trying to assign both the landing and taxi light to separate buttons on my joystick. 

 

I’m using FSUIPC, so I used LIST Var to see the list of commands. Scanning through the list, I could find any reference to either landing or taxi lights. 

 

Does anyone one know what they should be?

 

Cheers,

 

colin

Share this post


Link to post

If you can't find the right variables you can do it directly with FSUIPC offsets from Lua code. The following (abbreviated) is from Guenseli's original Twin Otter library for LINDA.

function Lights_LANDING_on ()
    ipc.setbitsUW("0D0C", 4)
end

function Lights_LANDING_off ()
    ipc.clearbitsUW("0D0C", 4)
end

function Lights_TAXI_on ()
    ipc.setbitsUW("0D0C", 8)
end

function Lights_TAXI_off ()
    ipc.clearbitsUW("0D0C", 8)
end

 

  • Upvote 1

Share this post


Link to post

Mark,

 

That is perfect, thank you. Up until now I have been using List Var and making macro files. How do I use the above library? Can I just use FSUIPC, or do I need LINDA as well?

 

cheers,

 

colin

Share this post


Link to post
1 hour ago, rowcoach said:

Can I just use FSUIPC, or do I need LINDA as well?

 

To use the library you will need LINDA. But if you just want the above functions you could make four individual one-line Lua programs and bind those to buttons. For example, to turn the landing lights on, make a file called (say) LandingLightsOn.lua, with the following contents:

 

ipc.setbitsUW("0D0C", 4)

 

Then you should find 'Lua LandingLightsOn' in the FSUIPC actions list and you can assign it to a button. (This is from memory, so I may have missed some details...)

  • Upvote 2

Share this post


Link to post

Good evening Mark. 

 

Just tried what what you suggested and it works perfectly. 

 

Thank you you for your help. 

 

Cheers,

 

colin

  • Upvote 1

Share this post


Link to post

Because we believe this topic has been answered we have closed it. If you have any more questions feel free to open a new topic.

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...