This really shouldn't be too hard but for reasons that i am not understanding, I can't get a code to work for this.
What I need is a simple visibility code for an AI model that will allow a dummy part to only show during that time between when the model enters it's "boarding" stage and it taxies and then the reverse, after it returns to park till the nav lights go out.
So the triggers should be simple for an AI model.
LIGHT_NAV and LIGHT_BEACON should do the trick. The idea is that the code uses a boolean output from each of these parameters to either show or hide the part.
Here's my feeble attempt at this code:
<part>
<name>Fake_Interior_LOD_100</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT NAV,bool)(A:LIGHT BEACON,bool) +
</code>
</parameter>
<minvalue>1</minvalue>
<maxvalue>2</maxvalue>
</visible_in_range>
</part>
The idea is that the stack returns a 1 when the nav lights are on (preflight or postflight) and a 0 until the beacon light comes on. So the min value to trigger the part's visibility should be a 1.
If the code returns a 0 or 2, that part should not show.
So it should be simple enough, add the first bool to the second bool, anything other than a 1 would hide the part.
But for whatever reason, it's not working like I want.
Also notice I am using a per part LOD part. I'm really hoping that this doesn't have an adverse effect on the xml visibility coding.
Thoughts??
What I need is a simple visibility code for an AI model that will allow a dummy part to only show during that time between when the model enters it's "boarding" stage and it taxies and then the reverse, after it returns to park till the nav lights go out.
So the triggers should be simple for an AI model.
LIGHT_NAV and LIGHT_BEACON should do the trick. The idea is that the code uses a boolean output from each of these parameters to either show or hide the part.
Here's my feeble attempt at this code:
<part>
<name>Fake_Interior_LOD_100</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT NAV,bool)(A:LIGHT BEACON,bool) +
</code>
</parameter>
<minvalue>1</minvalue>
<maxvalue>2</maxvalue>
</visible_in_range>
</part>
The idea is that the stack returns a 1 when the nav lights are on (preflight or postflight) and a 0 until the beacon light comes on. So the min value to trigger the part's visibility should be a 1.
If the code returns a 0 or 2, that part should not show.
So it should be simple enough, add the first bool to the second bool, anything other than a 1 would hide the part.
But for whatever reason, it's not working like I want.
Also notice I am using a per part LOD part. I'm really hoping that this doesn't have an adverse effect on the xml visibility coding.
Thoughts??



