• There seems to be an uptick in Political comments in recent months. Those of us who are long time members of the site know that Political and Religious content has been banned for years. Nothing has changed. Please leave all political and religious comments out of the forums.

    If you recently joined the forums you were not presented with this restriction in the terms of service. This was due to a conversion error when we went from vBulletin to Xenforo. We have updated our terms of service to reflect these corrections.

    Please note any post refering to a politician will be considered political even if it is intended to be humor. Our experience is these topics have a way of dividing the forums and causing deep resentment among members. It is a poison to the community. We appreciate compliance with the rules.

    The Staff of SOH

  • Server side Maintenance is done. We still have an update to the forum software to run but that one will have to wait for a better time.

ai aircraft makemdl.parts question

this4dave2

Members +
Hi
:upset::upset::confused::grief:

I am working on an ai aircraft and i was wondering if it is possible to have a part animate or disappear at a given time and not appear again until the aircraft lands and shuts down using XML code to do it. If any body can help with an answer and the xml code that will do this i would appreciate it.

I tried to use external or tip tanks fuel depletion as a trigger to no avail it appears that ai aircraft never runs out of fuel so the external or tip tanks never become empty is it true or am i missing something.

If any body has an ideas how to make external or tip tanks to deplete it fuel with XML code so i can use it as a trigger it would be appreciated.

Thanks for your help
David
 
I set it up DAY OF WEEK and Nav lights on/off.

Code:
<part>
    <name>Flares_v</name>       
    <visible_in_range>
        <parameter>
            <code>
                        (P:LOCAL DAY OF WEEK, number) 1 == 
                        (P:LOCAL DAY OF WEEK, number) 2 == or
                        (P:LOCAL DAY OF WEEK, number) 3 == or
                        (P:LOCAL DAY OF WEEK, number) 4 == or
                        (P:LOCAL DAY OF WEEK, number) 5 == or
                        (P:LOCAL DAY OF WEEK, number) 6 == or
                     if{ 
                         (A:LIGHT NAV, bool) 
                          if{ 1 } els{ 0 }
                       } 
                    els{ 0 }
                </code>
        </parameter>
        <minvalue>1</minvalue>
    </visible_in_range>
</part>

<part>
    <name>Flares_h</name>       
    <visible_in_range>
        <parameter>
            <code>
                        (P:LOCAL DAY OF WEEK, number) 1 == 
                        (P:LOCAL DAY OF WEEK, number) 2 == or
                        (P:LOCAL DAY OF WEEK, number) 3 == or
                        (P:LOCAL DAY OF WEEK, number) 4 == or
                        (P:LOCAL DAY OF WEEK, number) 5 == or
                        (P:LOCAL DAY OF WEEK, number) 6 == or
                     if{ 
                         (A:LIGHT NAV, bool) 
                          if{ 1 } els{ 0 }
                       } 
                    els{ 0 }
                </code>
        </parameter>
        <minvalue>1</minvalue>
    </visible_in_range>
</part>

<part>
   <Name>PTL850_rumpf</Name>
    <visible_in_range>
    <Parameter>
      <Code>
                        (P:LOCAL DAY OF WEEK, number) 3 == 
                     if{ 
                         (A:LIGHT NAV, bool) 
                          if{ 10 } els{ -5 }
                       } 
                    els{ 0 }
        </Code>
       <Lag>10</Lag>
    </Parameter>
        <minvalue>1</minvalue>
    </visible_in_range>
</part>

<part>
   <Name>PTL850_TFL</Name>
    <visible_in_range>
    <Parameter>
      <Code>
                        (P:LOCAL DAY OF WEEK, number) 1 == 
                        (P:LOCAL DAY OF WEEK, number) 2 == or
                        (P:LOCAL DAY OF WEEK, number) 5 == or
                     if{ 
                         (A:LIGHT NAV, bool) 
                          if{ 10 } els{ -5 }
                       } 
                    els{ 0 }
        </Code>
       <Lag>10</Lag>
    </Parameter>
        <minvalue>1</minvalue>
    </visible_in_range>
</part>

<part>
   <Name>UB32_innen</Name>
    <visible_in_range>
    <Parameter>
      <Code>
                        (P:LOCAL DAY OF WEEK, number) 1 == 
                        (P:LOCAL DAY OF WEEK, number) 3 == or
                        (P:LOCAL DAY OF WEEK, number) 4 == or
                        (P:LOCAL DAY OF WEEK, number) 6 == or
                     if{ 
                         (A:LIGHT NAV, bool) 
                          if{ 20 } els{ -8 }
                       } 
                    els{ 0 }
        </Code>
       <Lag>10</Lag>
    </Parameter>
        <minvalue>1</minvalue>
    </visible_in_range>
</part>

<part>
   <Name>UB32_aussen</Name>
    <visible_in_range>
    <Parameter>
      <Code>
                        (P:LOCAL DAY OF WEEK, number) 3 == 
                        (P:LOCAL DAY OF WEEK, number) 4 == or
                        (P:LOCAL DAY OF WEEK, number) 6 == or
                     if{ 
                         (A:LIGHT NAV, bool) 
                          if{ 18 } els{ -7 }
                       } 
                    els{ 0 }
        </Code>
       <Lag>10</Lag>
    </Parameter>
        <minvalue>1</minvalue>
    </visible_in_range>
</part>

<part>
   <Name>B8M_innen</Name>
    <visible_in_range>
    <Parameter>
      <Code>
                        (P:LOCAL DAY OF WEEK, number) 2 == 
                        (P:LOCAL DAY OF WEEK, number) 5 == or
                     if{ 
                         (A:LIGHT NAV, bool) 
                          if{ 20 } els{ -8 }
                       } 
                    els{ 0 }
        </Code>
       <Lag>10</Lag>
    </Parameter>
        <minvalue>1</minvalue>
    </visible_in_range>
</part>

<part>
   <Name>B8M_aussen</Name>
    <visible_in_range>
    <Parameter>
      <Code>
                         (A:LIGHT NAV, bool) 
                          if{ 0 } els{ 0 }
        </Code>
       <Lag>10</Lag>
    </Parameter>
        <minvalue>1</minvalue>
    </visible_in_range>
</part>

<part>
   <Name>R60</Name>
    <visible_in_range>
    <Parameter>
      <Code>
                        (P:LOCAL DAY OF WEEK, number) 1 == 
                        (P:LOCAL DAY OF WEEK, number) 2 == or
                        (P:LOCAL DAY OF WEEK, number) 3 == or
                        (P:LOCAL DAY OF WEEK, number) 4 == or
                        (P:LOCAL DAY OF WEEK, number) 5 == or
                        (P:LOCAL DAY OF WEEK, number) 6 == or
                     if{ 
                         (A:LIGHT NAV, bool) 
                          if{ 13 } els{ -12 }
                       } 
                    els{ 0 }
        </Code>
       <Lag>10</Lag>
    </Parameter>
        <minvalue>1</minvalue>
    </visible_in_range>
</part>


<part>
<Name>B8M_innen</Name>
<visible_in_range>
<Parameter>
<Code>
(P:LOCAL DAY OF WEEK, number) 2 ==
(P:LOCAL DAY OF WEEK, number) 5 == or
if{
(A:LIGHT NAV, bool)
if{ 20 } els{ -8 }
}
els{ 0 }
</Code>
<Lag>10</Lag>
</Parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>

This allows you to delay the visibility time.
When the Jets NAV light works but only if you configured in the aircraft.cfg two engines.

 
Back
Top