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

FSX Decreasing variable

Why not do it the other way around and simply increase a variable?
That way, you won't have to worry about initializing a "supply remaining" variable after every loading of the aircraft.
You, of course, also need to animate the supply indicator gauge the wrong way around, but that's easily doable.

The code berlow uses a tried and trusted variation of a timer to increase a variable every 10 seconds. After 30 Minutes (6*10*30), the pilot will be dead due to oxygen deprivation.

Code:
(P:ABSOLUTE TIME, seconds) (L:START TIME, seconds) - 10 >
  if{ (P:ABSOLUTE TIME, seconds) (>L:START TIME, seconds)
(L:Oxygen Supply, number) ++ (>L:Oxygen Supply, number)
}

(L:Oxygen Supply, number) 180 >
(L:Pilot Dead, bool) !
and
if{ 1 (>L:Pilot Dead, bool) }

H This is my take on the same
Code:
<!-- Oxygen Mask donned -->
   <Element>
      <Select>
         <Value>(L:OxyFlow,number) 0 &gt; (L:Don_Mask,number) 1 == and (L:crew_level,number) 2 &gt; and
if{ 2 (>L:Sound_mask,enum) } els{ 0 (>L:Sound_mask,enum) }</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 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>

<!-- 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>

Interestingly the sim sprung a surprise on me the other day. I pulled back too hard on the stick and the screen went black. Obviously a Gloc event. I was wondering if that could be artificially triggered.
 
Do something like Menu aircraft/vehicles Realism Special Effects G-effects. UnCheck the box and you can pull more than 4 g without the darned thing going black.
Of course you transport aircraft dweebs never see that.
Roy
 
Back in my day there was no such thing as an "incipient" spin. One practised recovering from the real thing. In the GFT one had to recover and return to within 10 deg of the original heading!
 
Back
Top