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

Visibility Tags

Bambi_007

Resource contributor
Messages
908
Country
germany
For what I need this Tags in Aircraft Modeling.

I need to learn more of this to understanding.

Thank You for Help.
 
Last edited:

n4gix

Resource contributor
Messages
11,662
Country
unitedstates
Visibility tags are the easiest thing to do...

...but, you didn't say for which sim: FS9 or FSX? They each use a slightly different method.
 

Bambi_007

Resource contributor
Messages
908
Country
germany
Oh yeah - ashes over my Head.

FS9 for the first Part please, dear Uncle Bill. :)
 
Messages
211
Country
germany
Code:
<part>
	<name>gear_control_light</name>
	<visible_in_range>
		<parameter>
			<sim>
				<variable>GEAR CENTER POSITION</variable>
				<units>percent</units>
			</sim>
		</parameter>
		<minvalue>90</minvalue>
        </visible_in_range>
</part>


or



Code:
<part>
	<name>gear_control_light</name>
	<visible_in_range>
		<parameter>
			<code>
				(A:GEAR CENTER POSITION, percent) 90 &gt;
                               if{ 1 } els{ 0 } }
			</code>
		</parameter>
		<minvalue>1</minvalue>
        </visible_in_range>
</part>

The indicator light is visible when center gear down over 90%.



Visibility with a L: variable

Code:
<part>
   <Name>TEST_SWITCH</Name>
      <Animation>
	<Parameter>
	  <Code>(L:testswitch, bool) 100 *</Code>
 	  <Lag>600</Lag>
	</Parameter>
      </Animation>
   <MouseRect>
	<Cursor>Hand</Cursor>
   <tooltip_id>TEST_L:VARIABLES</tooltip_id>
   <callback_code>
     (L:testswitch, bool) ! (>L:testswitch, bool)
   </callback_code>
   </MouseRect>
</part>


<part>
   <Name>TEST_VISIBILITY</Name>
	<visible_in_range>
	<Parameter>
	  <Code>(L:testswitch, number) 100 *</Code>
 	  <Lag>10</Lag>
	</Parameter>
		<minvalue>0</minvalue>
		<maxvalue>50</maxvalue>
	</visible_in_range>
</part>


TEST_VISIBILITY is visible when the TEST_SWITCH < keyframe 50
TEST_SWITCH is animated by keyframe 0-100
 
Messages
10,052
Country
us-arizona
Hey Sandra,



This is one that will hide/unhide in 4 modes; 1, 2, 3, and none, and it rotates through. This was done by Doug PropTrash Kallen (FS Guru). Its ingenious code work.

Note that in making this for your work, you will have two versions of L:vars' below.

WIth this, you can make a cowling (first entry), and the engine (hide the cowling and the engine appears). With that, your engine can be high detail on the ground only, and in flight, isnt being rendered, so frame rates stay high.


<part>
<name>lhc_pilot_selector</name>
<animation>
<parameter>
<code>
(L:press,bool) 10 *
</code>
<lag>100</lag>
</parameter>
</animation>
<mouserect>
<cursor>Hand</cursor>
<tooltip_text>Pilot Selector System (%((L:pILOT SHOW,enum))%{case}%{:0}Male)%{:1}Female)%{:2}Couple)%{:3}Empty)%{End}</tooltip_text>
<mouse_flags>LeftSingle+LeftRelease</mouse_flags>
<callback_code>(M:Event) 'LeftSingle' scmp 0 == if{ (L:pILOT SHOW,enum) 1 + 4 % (>L:pILOT SHOW,enum) 1 (>L:XMLSND4,enum) 1 (>L:press,bool) } (M:Event) 'LeftRelease' scmp 0 == if{ (>L:press,bool) }</callback_code>
</mouserect>
</part>

<part>
<name>lhc_pilot_male</name>
<visible_in_range>
<parameter>
<code>(L:pILOT SHOW,enum) 0 ==</code>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>

<part>
<name>lhc_pilot_female</name>
<visible_in_range>
<parameter>
<code>(L:pILOT SHOW,enum) 1 ==</code>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>

<part>
<name>lhc_pilot_couple</name>
<visible_in_range>
<parameter>
<code>(L:pILOT SHOW,enum) 2 ==</code>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>

<part>
<name>lhc_no_pilots</name>
<visible_in_range>
<parameter>
<code>(L:pILOT SHOW,enum) 3 ==</code>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>


Thanks Doug for this amazing code... Brilliant...!
 
Messages
10,052
Country
us-arizona
If you need one already written for the cowling/engine only, let me know.


That same code can be for military loadouts as well, such as clean, missles, missles and bombs, bombs ony, etc, etc.
 

Bambi_007

Resource contributor
Messages
908
Country
germany
Thanks a lot for your help.

If I need them Bill I will stay by your door and make bimmel bimmel.:)
 

n4gix

Resource contributor
Messages
11,662
Country
unitedstates
Oh yeah - ashes over my Head.

FS9 for the first Part please, dear Uncle Bill. :)
Rather that bombard you with complicated examples, let me instead point you to a generic set of FS9 XML Scripts that may be used for many different things:

http://www.aerodynamika.com/cgi-bin/yabb2/YaBB.pl?num=1145369292

Note that this is one of many examples that're contained in this XML Script repository, so it might help to bookmark this forum for future reference... :teacher:
 
Last edited:

Bambi_007

Resource contributor
Messages
908
Country
germany
Rather that bombard you with complicated examples, let me instead point you to a generic set of FS9 XML Scripts that may be used for many different things:

http://www.aerodynamika.com/cgi-bin/yabb2/YaBB.pl?num=1145369292

Note that this is one of many examples that're contained in this XML Script repository, so it might help to bookmark this forum for future reference... :teacher:


Thank you Bill - I have bookmark this.

Roger that.

So many cool things one can do with visibilities...

And Thank you Bill, too
 
Messages
22
Country
hungary
Hello everyone,

I working on a light AI aircraft for FS9 with Gmax, and I have a big problem with a feature what I cannot add to the model, so I started to search on the net for the solution, and google directed me here. :)

My problem is, I want to make pilot disappear when the engine not running, but those code what Lionheart wrote here doesn't work for me somehow. :(

Can anybody help and write me a short code for solve my problem?

Many thanks in advance!
 
Messages
211
Country
germany
Code:
<part>
	<name>Pilot</name>
	<visible_in_range>
            <parameter>
		<code>
		    (A:GENERAL ENG1 THROTTLE LEVER POSITION, percent) 0 &gt;
                     if{ 1 } els{ 0 } 
		</code>
	    </parameter>
		<minvalue>1</minvalue>
     </visible_in_range>
</part>
 
Messages
179
Country
germany
Rainer, that would hide the pilot each time the throttle is on idle.


This should work in FS9.
Hides the pilot when the plane is at rest on ground with no electrics running and the engine being off, in other words cold and dark.

Code:
<part>
  <name>Pilot</name>
   <visible_in_range>
     <parameter>
      <code>
       (A:SIM ON GROUND,bool) 1 ==  
       (A:PARTIAL PANEL ELECTRICAL,enum) 1 == 
       (A:GENERAL ENG1 COMBUSTION, bool) 0 == 
       (A:GROUND VELOCITY, knots) 1 &lt; 
       &amp;&amp; &amp;&amp; &amp;&amp;
       if{ 1 } els{ 0 } 
      </code>
    </parameter>
  <minvalue>1</minvalue>
  </visible_in_range>
</part>
 
Messages
211
Country
germany
Oh, sorry. In my version, the pilots are seen during a flight does not always.

Code:
<part>
	<name>Pilot</name>
	<visible_in_range>
		<parameter>
		<code>
		    (A:LIGHT BEACON, bool) 1 ==
                     if{ 1 } els{ 0 } 
		</code>
		</parameter>
		<minvalue>1</minvalue>
        </visible_in_range>
</part>

The engine and the beacon light are always the AI_aircraft at the same time on/off.
Engine parameters are not working at the AI_aircraft.



This is the configuration for my AI_MiG-21U.

Code:
<part>
	<name>Pilot</name>
	<visible_in_range>
		<parameter>
			<code>
                       (E:TIME OF DAY, enum) 3 ==
                        if{
                           (A:LIGHT BEACON, percent) 50 &gt;
                           (A:LEFT WHEEL RPM, rpm) 0 &lt; or
                                  if{ 1 } els{ 0 } 
                          }
                       els{
                           (A:LIGHT NAV, percent) 50 &gt; 
                           (A:LIGHT CABIN, percent) 50 &lt; and
                                  if{ 1 } els{ 0 }
                          } 
                 </code>
		</parameter>
		<minvalue>1</minvalue>
        </visible_in_range>
</part>

During the day, the pilot is shown as 6 seconds before the pushback and to 6 seconds after the engine off.
Outside of the day the pilot is to see when the pushback begins.
The beacon light (and engine) is turned on after pushback.
 
Messages
22
Country
hungary
Dear Flusirainer and Matthias!

Many thanks for your prompt reply! Maybe there is a little misunderstanding on my side, so I'll write down what I do with your code - because my pilot is still visible in my aircraft. :(

1. Open up makemdl.parts.xml with MS Notepad

2. Copy-paste your code to the end of the document but before </part_dictionary> tag.

3. Edit your <name> tag to my Gmax object's name: pilot_hide

4. Save document

5. Open up Gmax, double chack pilot object name, nothing else, and export it as mdl.

6. Copy this mdl file to my aircraft/model directory.

Is it a good method or I made a mistake somewhere?
 
Messages
179
Country
germany
Zlin, I should add that I'm not at all familiar with FS9 code.
What I posted is basically a reformatting of the code I use for my FSX aircraft using Flusirainer's formatting as a template.
Having said that I'm not familiar with the FS9 v. Gmax procedures either.
Whatever, the code portion should work in FS9:

Code:
<code>
       (A:SIM ON GROUND,bool) 1 ==  
       (A:PARTIAL PANEL ELECTRICAL,enum) 1 == 
       (A:GENERAL ENG1 COMBUSTION, bool) 0 == 
       (A:GROUND VELOCITY, knots) 1 &lt; 
       &amp;&amp; &amp;&amp; &amp;&amp;
       if{ 1 } els{ 0 } 
</code>

I'm not sure about the actual formatting.
Maybe you should try a minvalue of -1?
Other than that I hope some FS9ers may pop in and set you straight.
 
Messages
211
Country
germany
Well, remember when you copy something, for example <part> or </ part>?

The MakeMDL.parts.xml must be in the same folder as MakeMDL.exe! ???

In a previous configuration is a syntax error?
When that happens, then everything is under there no function.
 
Messages
22
Country
hungary
Thanks for the answers, guys!

Yeah I'll copy my Gmax object name to between <part> </ part>, and of course, the xml and makemdl.exe is in the same folder. I got no any error message during compiling, everything run as it should be.

I still remember those days, when I made my aircrafts with FSDS...just selected the objects and check 'Invisible when engine stopped' option from the menu - and everything works well, nothing complication...
 
Top