• 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.

FS2004 Engine oil pressure

Messages
1,468
Country
italy
(A:Eng1 oil pressure,PSI) rises and falls naturally as the engine starts and runs. My question is, how can I change it to simulate an engine problem?
Instead of using L:vars I want to find a something that directly affects the A:var.
vololiberista
 
The only way to effect the A:var is to use the aircraft failure dialog in the aircraft menu when flying in fsx...unfortunately there is no way to trigger it via xml code..maybe simconnect ?
you can fake it via xml but your limited to engine failure and or switching on/off sytems to model misfiring ect..you can use the spoiler to model slowdowns if your aircraft isnt using it for its intended purpose :)

A simple example of faking it :)
code for oil pressure needle
Code:
<PartInfo>
    <Name>needle_oil_press</Name>
    <AnimLength>200</AnimLength>
    <Animation>
      <Parameter>
        <Code>(A:ELECTRICAL MASTER BATTERY,bool) 1 == (L:upside, number) 0 == and if{ (A:GENERAL ENG OIL PRESSURE:1, psi) } els{ 0 }</Code>
    <Lag>10</Lag>
      </Parameter>
    </Animation>
  </PartInfo>
then code to trigger the L:upside,number

Code:
<Gauge Name="oils arnt oils" Version="1.0">
<Update Frequency="7"/>
  <Element>
    <Select>
      <Value>(A:PLANE BANK DEGREES,degree) abs 100 &gt;
              (A:REALISM,percent) 95 &gt; &amp;&amp;
	  if{ (L:upside,number) 1 &lt; if{ 1 (&gt;L:upside,number) } }
	  els{ (L:upside,number) 0 &gt; if{ 0 (&gt;L:upside,number) } } 
      </Value>
    </Select>
 </Element>

  <Element>
    <Select>
      <Value>(L:upside,number) 1 == 
              (A:REALISM,percent) 95 &gt; &amp;&amp;
              if{ (G:Var6) 0 == if{ 1 (&gt;G:Var6) (P:Local Time, seconds) 20 + (&gt;G:Var7) } }
             els{ (G:Var6) 0 &gt; if{ 0 (&gt;G:Var6) } }
      </Value>
    </Select>
 </Element>

  <Element>
    <Select>
      <Value>(G:Var6) 1 == 
              if{ (P:Local Time, seconds) (G:Var7) &gt; if{ 1 (&gt;L:oil_dry,number) } }
      </Value>
    </Select>
 </Element>
</Gauge>
this then sets a L: oil_dry,number var after 20 sec of flying upside down which is then used to switch on engine failure ect
the above code could be simplified a bit and needs a tidy up as its old code from when I didnt know better :) but it works ;)
 
Yes, it seems that the only way is to use the A:var as a "background" variable using L:vars as the principal drivers. Ten times more work :(
vololiberista
 
Back
Top