• 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 Gmax Part Code Question

Messages
10,163
Country
us-arizona
Hey guys,

I am converting my codes to FSX.

I need to write some parts up that will appear when given a L:var code input, such as wheel chauks, etc.

I also need the original 'engine off' code, which FSX doesnt seem to support anymore.

I was wondering if you could show me the proper way it would be written.

Here is what I have so far.



<PartInfo>
<Name>wheel_chauks_visible</Name>
<Visible>
<Parameter>
<CallbackCode>(L:wheel_chauks_visible, bool)</CallbackCode>
</Parameter>
<Minvalue>1</Minvalue>
</Visible>
</PartInfo>



<Animation name="wheel_chauks_visible" guid="9144A461-9AF6-4e2c-810B-E637334AC616" length="100" type="Sim" typeParam2="wheel_chauks_visible"

typeParam="AutoPlay" />


Does that look 'feasible'?



Many thanks guys,

Bill
LHC
 
Code:
    <PartInfo>
      <Name>wheel_chauks_visible</Name>
            <Visible>
               <Parameter>
               <CallbackCode>(L:wheel_chauks_visible, bool)</CallbackCode>
               </Parameter>
           <Minvalue>1</Minvalue>
    </Visible>
    </PartInfo>


<Animation name="wheel_chauks_visible" guid="9144A461-9AF6-4e2c-810B-E637334AC616" length="100" type="Sim" typeParam2="wheel_chauks_visible"

typeParam="AutoPlay" />

Does that look 'feasible'?

In FSX if all you want is <Visibility> control, you do not need to create an <Animation...guid=..../> entry at all!

Despite what is in the sample modeldef.xml file and the SDK, <Minvalue> and <Maxvalue> do not work!

Here is a prototype for a simple, boolean type <Visibility> script:

Code:
   <PartInfo>
      <Name>MyTagName</Name>
	    <Visibility>
		<Parameter>
	         <Code>(L:MyCustomVariable,bool)</Code>
		</Parameter>
     	    </Visibility>
   </PartInfo>
 
Many thanks Fr. Bill,

Ive adjusted them to the new code layout, but for some reason, they will not interact with my panel gauge, which selects their visibility per off then on. In FSX, they show as visible, and are not able to be turned off.

Also, and this is odd. I found 'engine0_stopped' and 'engine0_turning' in the parts XML list, but not in the animation manager, nor in the Attach Tool/Visibility selections. I did find my animations/visibilities in the Animation Manger though, probably because I have a GUID on them.

How does one get the Visibility to actually function? (Perhaps my panel gauge originally designed for FS9 needs a diff panel code to manage FSX Gmax parts on the model?)


EDIT: I am posting the codes for the Visibility nodes. By the way, these are blocks with an insivible texture applied, and parts assigned to them in Hierarchy. I am 'hoping' that is still the way things are done in FSX/Gmax.


Code:
   <PartInfo>
      <Name>air_door_parts_appear</Name>
	    <Visibility>
		<Parameter>
	         <Code>(A:Exit Open,percent) 99 &gt;</Code>
		</Parameter>
     	    </Visibility>
   </PartInfo>



   <PartInfo>
      <Name>wheel_chauks_visible</Name>
	    <Visibility>
		<Parameter>
	         <Code>(L:wheel_chauks_visible, bool)</Code>
		</Parameter>
     	    </Visibility>
   </PartInfo>


   <PartInfo>
      <Name>luggage_visible</Name>
	    <Visibility>
		<Parameter>
	         <Code>(L:luggage_visible, bool)</Code>
		</Parameter>
     	    </Visibility>
   </PartInfo>

   <PartInfo>
      <Name>turbine_plugs_visible</Name>
	    <Visibility>
		<Parameter>
	         <Code>(L:turbine_plugs_visible, bool)</Code>
		</Parameter>
     	    </Visibility>
   </PartInfo>

   <PartInfo>
      <Name>passengers_visible</Name>
	    <Visibility>
		<Parameter>
	         <Code>(L:passengers_visible, bool)</Code>
		</Parameter>
     	    </Visibility>
   </PartInfo>


   <PartInfo>
      <Name>pitot_flags_visible</Name>
	    <Visibility>
		<Parameter>
	         <Code>(L:pitot_flags_visible, bool)</Code>
		</Parameter>
     	    </Visibility>
   </PartInfo>

Bill
 
Last edited:
Bill, you now have my 'enhanced version' of the modeldef.xml file. Note that the same format for the XML <Visibility> scripts does work for me...

Try this method...

1) create a small, 1"x1"x1" cube using Keyboard entry, so the part will automatically be placed at 0,0,0 in GMax.

2) Edit the poly to remove all polys except the one on the bottom. This will effectively make it invisible... ;)

3) Use this simple object for your control nodes, Cloning and Renaming as needed for your project.

4) Use the Attachpoint Tool to add the <Visibility> tag to each node as needed, Linking all objects to be controlled to this node.

I've been doing this for the past year+ and it's never failed... :D
 
Still nothing.

Bill, you say that you add this on as a Visibility. I must have missed something. How do I get the 'visibility' to show up in Attach Tool? The only place it will show up (and thats if it has a GUID) is in the Animation Manager.



Bill
 
Well... I found them, and they are indeed 'visibility' calls used in Attach Tool. They werent there before, but they are sure as heck there now. Thats all I care about. :D

Crazy.

They work fine now Bill. Thanks for your help.


Bill
 
Still nothing.

Bill, you say that you add this on as a Visibility. I must have missed something. How do I get the 'visibility' to show up in Attach Tool? The only place it will show up (and thats if it has a GUID) is in the Animation Manager.

Bill

A picture is worth a thousand words... ;)

attachpointtoolvisibilily6.jpg
 
Well... I found them, and they are indeed 'visibility' calls used in Attach Tool. They werent there before, but they are sure as heck there now. Thats all I care about. :D

Crazy.

They work fine now Bill. Thanks for your help.


Bill

You may notice something "new" in the Animation Tool's window as well. There's a whole bunch of "AE - xxx" groups now. All of the common animation 'tags' have been pre-set to show up as a "Group"... ;)

It makes finding things so much easier! :D

animationtoolgrouptags0gy5.jpg
 
Last edited:
Very nice! Thanks for the heads up Fr. Bill.

Having them in groups certainly does make it easier.


Bill
 
Back
Top