Sign in to follow this  
Moonwolf

How to send both a key event and ipc control?

Recommended Posts

In P3D by pressing a joystick button, I need to both send a key event (release droppable objects) and activate the smoke-system via an ipc control. It is important that these actions are separate.

Can anyone help with this?

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi Moonwolf

 

Welcome to LINDA. Do you have a particular aircraft in mind? You need to create a function in the aircraft's user.lua file (modules\linda\aircrafts\{your aircraft}\user.lua) along the lines of:

 

function DropSmoke

     ipc.control(66658,0)  -- droppable objects

     ipc.control(65559,0)  -- smoke toggle

end

 

You will find the correct FSX Control code and param by using the LINDA Tracer and test by clicking SEND. I have not be able to test as none of my default P3D aircraft have droppable tanks or smoke.

 

Then assign the function to the button required.

Share this post


Link to post
Share on other sites

Hi Moonwolf

 

Welcome to LINDA. Do you have a particular aircraft in mind? You need to create a function in the aircraft's user.lua file (modules\linda\aircrafts\{your aircraft}\user.lua) along the lines of:

 

function DropSmoke

     ipc.control(66658,0)  -- droppable objects

     ipc.control(65559,0)  -- smoke toggle

end

 

You will find the correct FSX Control code and param by using the LINDA Tracer and test by clicking SEND. I have not be able to test as none of my default P3D aircraft have droppable tanks or smoke.

 

Then assign the function to the button required.

 

Thanks Scotflieger.

 

The ipc control for Smoke is fine, but "Droppable objects" must be an event like "Shift+d" otherwise it will not be read by an external program through SimConnect, so I am told.

Share this post


Link to post
Share on other sites

LINDA uses FSUIPC4 and not SimConnect to communicate with the flight sims. I do not know enough about SimConnect to advise you. Perhaps you should look if FSUIPC4 can provide what you need.

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