Jump to content
The simFlight Network Forums

Send Control to a Simobject


Recommended Posts

Hi Paul,

 

I wanted to know if it is possible to send controls via Offset 0x3110 to a none user Simobject (Ground or Misc or Airplane).

I have the ID the Simobject.

 

How can I specify the ID to use in :

sendControl.Value = ACTION_TO_DO;

FSUIPCConnection.Process();

 

 

Thank you for your help.

 

Motus

Link to comment
Share on other sites

Hi Motus,

 

As far as I know, it's only possible to send controls to the user's aircraft (0x3110) and an AI traffic aircraft (0x2900).

 

See the documentation for details on 0x2900.If you want to try it, declare 3 offset<int>  (2904, 2908, 2900), You must declare 2900 after the others for it to work.

 

For other types of object you'll need to use SimConnect.

 

Paul

Link to comment
Share on other sites

Thank you Paul for all these intersting informations.

 

Can you confirm this sample ?

 

private Offset<int> id = new Offset<int>(0x2904);

private Offset<int> ctrl = new Offset<int>(0x2908);

private Offset<int> val = new Offset<int>(0x2900);

 

id.value = 637;   // FSX ID od my Simobject

ctrl.value = 66054; // STOBES_SET for example

val.value = 1;   // Set to 1 for true

FSUIPCConnection.Process();

 

 I will give you results if it's Ok.

Thank you again.

 

Motus 

 

 

  

 

 

 

 

 

 

 

Link to comment
Share on other sites

It seems fine, except that it might not work with the Simobject ID. The ID needs to be from the FSUIPC TCAS table (the AI aircraft tables). You can get this through the DLL using the AITrafficServices.

 

Pete might have used the Simobject ID to generate the TCAS IDs in FSUIPC, but I don't know. You'll have to look and find out.

 

Paul

Link to comment
Share on other sites

Sorry, I've just looked a bit closer and you've got the offsets a bit wrong. They should be this: (ID should be 2900 - it just needs to be declared after the others).

private Offset<int> ctrl = new Offset<int>(0x2904);
private Offset<int> val = new Offset<int>(0x2908);
private Offset<int> id = new Offset<int>(0x2900);

id.value = 637;   // FSX ID od my Simobject
ctrl.value = 66054; // STOBES_SET for example
val.value = 1;   // Set to 1 for true
FSUIPCConnection.Process();

Paul

Link to comment
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
×
×
  • 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.