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

Black out trigger in FS code?

Messages
10,163
Country
us-arizona
Hey all,

Does FS have a blackout code for pilots?

Example, pull too many G's and you black out. Screen goes black. Is there something that can trigger that in code? Can we directly link to that with a code string?
 
If you use a screen-sized panel window with the "child_3d=1" parameter, you'll have yourself a relatively easy to implement solution. Onset of blackout: Open panel window. Progressing blackout: Cycle through bitmaps of increasing opacity. Full on blacked out: A fully opaque, black bitmap in the panel window. You can even recycle the window for simulating redouts.
 
Leone, you might find this useful
Code:
<!-- Hypoxia settings-->
   <Element>
      <Select>
         <Value>(L:Cabin_Alt_Ind, number) 27000 &gt; (L:Cabin_Alt_Ind, number) 30000 &lt; and (L:Oxy_Charged,bool) 1 == and
(L:oxygen mask not pulled,number) 0 == and
if{ 1 (>L:emergency,bool) (P:local time,seconds) 180 + (>L:oxygen mask not pulled,number) }</Value>
      </Select>
   </Element>

   <Element>
      <Select>
         <Value>(L:Cabin_Alt_Ind, number) 30000 &gt; (L:Cabin_Alt_Ind, number) 35000 &lt; and (L:Oxy_Charged,bool) 1 == and
(L:oxygen mask not pulled,number) 0 == and
if{ 1 (>L:emergency,bool) (P:local time,seconds) 90 + (>L:oxygen mask not pulled,number) }</Value>
      </Select>
   </Element>

   <Element>
      <Select>
         <Value>(L:Cabin_Alt_Ind, number) 35000 &gt; (L:Cabin_Alt_Ind, number) 40000 &lt; and (L:Oxy_Charged,bool) 1 == and
(L:oxygen mask not pulled,number) 0 == and
if{ 1 (>L:emergency,bool) (P:local time,seconds) 30 + (>L:oxygen mask not pulled,number) }</Value>
      </Select>
   </Element>

   <Element>
      <Select>
         <Value>(L:Cabin_Alt_Ind, number) 40000 &gt; (L:Oxy_Charged,bool) 1 == and (L:oxygen mask not pulled,number) 0 == and
if{ 1 (>L:emergency,bool) (P:local time,seconds) 12 + (>L:oxygen mask not pulled,number) }</Value>
      </Select>
   </Element>

<!-- Oxygen Mask not Pulled in time -->
   <Element>
      <Select>
         <Value>(L:blackout,number) 0 == (L:oxygen mask not pulled,number) 0 &gt; and (L:Don_Mask,number) 0 == and (L:emergency,bool) 1 == and
if{ (L:oxygen mask not pulled,number) (P:local time, seconds) &gt;
if{ 280 (>K:PANEL_ID_OPEN) } els{ 1 (>L:blackout,number) 11025 (>K:PANEL_ID_OPEN) 1 (&gt;K:SOUND_OFF) } }</Value>
      </Select>
   </Element>

<!-- Hypoxia recovery-->
   <Element>
      <Select>
         <Value>(L:blackout,number) 1 == (L:emergency,bool) 1 == and (L:Cabin_Alt_Ind, number) 15000 &lt; and
if{ 0 (>L:blackout,number) 0 (>L:emergency,bool) 1 (>K:SOUND_ON) 11025 (>K:PANEL_ID_CLOSE) }</Value>
      </Select>
   </Element>




<Gauge Name="Blackout">

<Element>
<Select>
  <Value>(L:Blackout,number) 1 == </Value>
<Case Value="1">
            <Image Name="Blackout256.bmp"/>
         </Case>
</Select>
</Element>
</Gauge>
 
Back
Top