• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Engine Failures

Messages
7
Hi,

I'm currently trying to activate engine failures with SimConnect. Having read some topics in the forums it seems like the only way this can be done is with missions...
In the api doc though there is a value for "engine on fire" (not a complete failure, but might be ok) which should be setable, but I can't get it to work.
Here's what I've done:

Code:
...

SimConnect_AddToDataDefinition( hSimConnect, DATDEF_SETENG1ONFIRE, "ENG ON FIRE:1", "bool", SIMCONNECT_DATATYPE_INT32);

...

long lValue = 1;
SimConnect_SetDataOnSimObject( hSimConnect, DATDEF_SETENG1ONFIRE, SIMCONNECT_OBJECT_ID_USER, NULL, 0, 4,
&lValue );

But nothing happens when I try it, hope you can help me there.
 
Which version of FSX and the SDK are you using? There was a bug in the RTM code for the Engine On Fire setting logic that was fixed in either SP1 or SP2/XPack.
 
I've been doing a lot of work with failures via SimConnect lately and the support for them seems very incomplete. There's very few of the possible system failures accessible through events or variables.

I found it easier to simulate them myself and code in the side-effects.

Si
 
Which version of FSX and the SDK are you using? There was a bug in the RTM code for the Engine On Fire setting logic that was fixed in either SP1 or SP2/XPack.
That's it, I was using the RTM version. Updated to SP2 and now it works, thanks.
 
Just relooked at your original AddToDataDef, what kind of airplane are you flying? You are asking for the second engine to catch on fire, if you aren't in a multi-engine aircraft, then this will have no effect. In order to affect the first engine, use "ENG ON FIRE:0" (all indexed vars start at 0).
 
In order to affect the first engine, use "ENG ON FIRE:0" (all indexed vars start at 0).
I hate to disagree with an MS expert, Tim, but in all my code the ennumeration starts with 1 and works fine, and has done these two years gone.

This applies to Engines (1 - 4), Radios (NAV 1, 2, COM 1, 2), Payload Stations 1 - N, Elevon deflection 1 - 8, pretty much everything. In fact the ONLY value I've found which has counts going from 0 is Exit Open.

Best regards

Pete
 
Hey Pete,

I'll take your word for it, I've been dealing with mostly new vars that I've added recently, and they are zero based :-> Could have sworn all the others were as well, but haven't had to deal with engine based vars much myself.
 
Back
Top