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

Wings folded by default

Status
Not open for further replies.

ajweber

Banned
Messages
64
Hi,

Working on a carrier based aircraft and I need to code the modeldef with an ini to have the wings folded on aircraft load. Here is the code I've tried (unsuccessfully!!!) to use:

Code:
<PartInfo>
    <Name>WINGS_CHECK</Name>
    <Visibility>
      <Parameter>
        <Code>
          (L:WINGSinit, bool) 0 ==
          if{
               100 (>A:FOLDING WING LEFT PERCENT, percent)
               100 (>A:FOLDING WING RIGHT PERCENT, percent)                      
               1 (>L:WINGSinit, bool)  
          }
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>

Any help greatly appreciated! smile

Thanks!
 
Last edited:
Hi, first off all im not at my computer now so cant give you the exact code, but you cannot set the wings to fold using the A var.

The code should be something like

(L:wing init,bool) 0 ==
If{
(A:folding wing,percent) 0 }

If{
100 (>K:wing fold)
1 (>L:wing init,bool) }
 
Last edited:
Hi Zeiten,

Thanks for the help, unfortunately still no joy! Ran both sets of codes through Infix and tried all combinations in the event of any type o's, but it's still not working!
 
The only event I can find in FS9 is:

(>K:TOGGLE_WING_FOLD)

You would have to work on the coding, since this just flips between folded and unfolded. You cannot specify a keyframe number.

So something like this?

Code:
<PartInfo>
    <Name>WINGS_CHECK</Name>
    <Visibility>
      <Parameter>
        <Code>
          (L:WINGSinit, bool) 0 == (A:FOLDING WING LEFT PERCENT, percent) 100 &lt; &amp;&amp;
          if{
               (>K:TOGGLE_WING_FOLD)
               1 (>L:WINGSinit, bool)  
          }
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>

I don't even know if you *can* use K: events in a custom part. If not, this could always be made into a 2D gauge and specified in the VC gauge listing of the panel.cfg file.
 
Hi tgibson,

I've used similar code to initiate parts to be in specific positions when the aircraft was loaded in FSX. For some reason unbeknownst to me, the wing fold variable doesn't want to set using xml ini code assigned to a poly in the modeling process. Code I've used in the past (thanks to Bill! smile) didn't include keyboard commands, just A:var and worked perfectly.

So my question at this point is, has anybody else been able to get the A:var for wing fold to set a default position (folded!) on an aircraft using xml ini coding in the modeldef.xml? If so, please shed some light on what I'm doing wrong!! LOL

Thanks!
 
Why don't you just reverse-animate the wing?

I really doubt that wing folding is anything beyond a visual thing in MSFS.
 
No, AFAIK you cannot use A: variables to set anything directly into the sim. You must either use the K: events or use something like SimConnect or FSUIPC programming (which I don't know).
 
Hi Heretic,

Tried that, and when the wings were "unfolded" the aircraft dropped off the flightdeck like a rock!! LOL. FSX "considered" the wings to be "unfolded" at loading, so flipping things around caused the plane to be unflyable. Thanks anyway!

Hi tgibson,

I've used A:var on my ships through modeldef.xml to set ini codes in the past. I used parts that were otherwise "unused" to control parts on my ships. For example the cowl flaps animation for guns. Here is actual code used:

<!-- INITIALIZATION CHECK -->
<PartInfo>
<Name>GUNS_CHECK</Name>
<Visibility>
<Parameter>
<Code>
(L:GUNSinit, bool) 0 ==
if{
<!-- SET POSITION GUN#1 -->

50 (>A:Recip eng1 cowl flap position, percent)
50 (>A:Recip eng2 cowl flap position, percent)

<!-- SET POSITION GUN#2 -->

50 (>A:Recip eng3 cowl flap position, percent)
50 (>A:Recip eng4 cowl flap position, percent)

1 (>L:GUNSinit, bool) // SET FLAG AS "DONE"
}
</Code>
</Parameter>
</Visibility>
</PartInfo>

When the ship was loaded, the guns (including barrels!) were at the mid point of their rotations, in other words centered, the way I wanted them!
Something seems to be different about the wings fold A:var, as I can't seem to get it to work for me the way I got things to work in the past. I'm trying not to substitute the native wing fold animation for an L:var or other A:var, as it would allow the aircraft to fly with it's wings folded, not very realistic!!

BTW: The code above was a result of Bill Leaming's help on one of my ship projects. If you are around Bill, I could use your imput right about now! smile

Thanks again guys!
 
Last edited:
Others have tried that dozens of times and it has never worked. Your guns probably end up at mid position for a different reason...
 
LOL!!!!!!!

Well then, according to your statement I'm a really lucky guy and Bill doesn't know what he's talking about because I also used the following code using A:varibles as well in order to center my missile launchers (along with my guns, again, both with the proper animation and tags applied!!)

<!-- INITIALIZATION CHECK -->
<PartInfo>
<Name>RAILS_CHECK</Name>
<Visibility>
<Parameter>
<Code>
(L:RAILSinit, bool) 0 ==
if{
<!-- SET POSITION RAIL#1 -->
25 (>A:AILERON TRIM PCT, percent)

<!-- SET POSITION RAIL#2 -->
-25 (>A:RUDDER TRIM PCT, percent)

1 (>L:RAILSinit, bool) // SET FLAG AS "DONE"
}
</Code>
</Parameter>
</Visibility>
</PartInfo>


Try it and see if it works before you rush to judgement guy, you might be surprised!!!

BTW: I've been doing this for awhile, so if I say it works, you can take it to the bank!!! LOL
 
Last edited:
The poster has been banned as you will see and this thread is now closed
 
Status
Not open for further replies.
Back
Top