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

Hide Engine code when Cowling is Closed

Hi
What FrBill said :)
also if its to fast just up the KF number,dont be afraid to use 1000 kf for these sorts of things as they are only used every now and then,it doesn't really hurt fps when its an on off type animation.
What I think is happening is your using a simple on off switch in the mouse code,its setting the L:COWLING REMOVE bool to 0 and the animation is lagging behind playing catch up.There something funny going on with the LAG tags in FSX.I dont know what but I get funny results when using it...like when you use (A:ADF RADIAL:1, degrees) dnor with a lag tag the needle wont keep spinning around the dial but it instead will go back the other way
Cheers
Wozza
 
I just thought I would bump the thread and see if anyone came up with revolutionary new codes for keeping the engine hidden when the cowling is closed, and always showing when cowling is open...

(Didnt work for me).

Dwight and I tried a timer that would hide the engine after a certain while. That too 'oddly' didnt work.


I miss wingfold endcap...

<-- kicks the dirt
 
Hi Mate
Ill do some tests on the code today and get back to you with a solution
btw we are not mind readers ;) post back when it no worky then we move onto plan B C D E F :D
Cheers
Wozza
 
Hi Bill
Ok had a play and can see the problem which I thought would be an easy fix but using L:var is causing issues with the vis code.Whats happening is the switching of the animation is fast regardless of how its coded the var is set instantly to 1 or 0
and the animations lag behind as the vis code is toggled via the Vars state rather than the animation state.Now saying that some of the default sim animations dont work like that they work on the animation kf locations, as you mentioned the wing fold Im assuming your ok with using that ?
the cover code it will need a GUID
Code:
	<PartInfo>
        <Name>remove_cover</Name>
        <AnimLength>100</AnimLength>
        <Animation>
            <Parameter>
                <Sim>
                    <Variable>FOLDING WING LEFT PERCENT</Variable>
                    <Units>percent</Units>
                </Sim>
            </Parameter>
        </Animation>
	</PartInfo>
and the vis code
Code:
 <PartInfo>
	<Name>Vis_wing</Name>
	<Visibility>
	    <Parameter>
	<Code>
	     (A:FOLDING WING LEFT PERCENT, percent) 0 &gt; if{ 1 } els{ 0 }
	</Code>
	    </Parameter>
	</Visibility>
   </PartInfo>
for the switch you can use the default lever_toggle_wing_fold in the accel ver of the modeldef.xml file in the sdk's bin folder
Code:
  <PartInfo>
    <Name>lever_toggle_wing_fold</Name>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (A:FOLDING WING LEFT PERCENT, percent)
        </Code>
        <Lag>400</Lag>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <MouseFlags>LeftSingle</MouseFlags>
      <TooltipID>TOOLTIPTEXT_FOLDING_WING_HANDLE</TooltipID>
      <CallbackCode>
        (&gt;K:TOGGLE_WING_FOLD)
      </CallbackCode>
    </MouseRect>
  </PartInfo>
Ive tested it and it works fine ;)
Wozza
OOOPS forgot the aircraft.cfg need to be modified with this
[folding_wings]
wing_fold_system_type=4 // Available
fold_rates = 0.25,0.20 // Left,Right: 1/sec
you can alter how fast the animation is via the fold_rates,there is a typo in the sdk docs the system must be 4 to be manual as any of the other systems require the aircraft to be running in order to work.
 
Last edited:
Wozza - that's also known as the "lavatory dump valve" approach ... :)
LOL hard learned lessons are hard to get away from ;)
Honestly I try to do it the right way, but 90% of the time it ends up in the toilet :D

I like the wingfold Idea for ground based gear,as it has the added advantage that the aircraft will not take off if the engine covers not on
 
Last edited:
Hey Wozza,

Very interesting set of codes.

I am off to check them out and give them a good studying..

A thousand thanks Sir.
 
The infamous 'hiding engine/nose bay' odyssee continues.

Wozza, your version didnt work for me for some reason. The parts remained hidden. I ended up reverting back to my previous version that has the parts hide at the half way point, lol..

I'll have to think this through. There must be some very basic trigger that will properly innitiate the viz code.

I noticed also in the VC mode, that when you get into the VC, if you have deployed the cowlings already, that in VC mode, the cowlings again deploy. I can only think its because the VC model is a totally seperate model and the animations, for some odd reason, will not 'occur' in real time in both models, so when you get into the VC, the animations happen all over again..

Gotta love FSX. :d (eet eez a mohnstahr I tehl yiew... eh mohnstahrrrr!!!)

If all else fails, I can have the parts just stay visible until a fix can be found. I could also freeze the cowlings and export parts without the nose and engine bays, but eeks! all that work?? nope..... lol

Bill
 
Hi Bill
Hmmm I checked the code every which way I could and it checked out.
The VC reanimating senero sound like something is wrong somewhere
or there is slightly different code in each model causing the animation to reset.
Perhaps yet again post the code as you have it and how you have it maooed in each model.I know Ive sat here for hrs looking at a piece of code wondering why it wont work,posted on a message board for help and as I posted it noticed a typo :)
Wozza
 
Ok.. Here is the code I put in for the cowlings using Wingfold.




Code:
<PartInfo>
        <Name>lhc_remove_cover</Name>
        <AnimLength>100</AnimLength>
        <Animation>
            <Parameter>
                <Sim>
                    <Variable>FOLDING WING LEFT PERCENT</Variable>
                    <Units>percent</Units>
                </Sim>
            </Parameter>
        </Animation>
	</PartInfo>


 <PartInfo>
	<Name>lhc_Vis_wing</Name>
	<Visibility>
	    <Parameter>
	<Code>
	     (A:FOLDING WING LEFT PERCENT, percent) 0 &gt; if{ 1 } els{ 0 }
	</Code>
	    </Parameter>
	</Visibility>
   </PartInfo>



 <PartInfo>
    <Name>lhc_lever_toggle_cowlings</Name>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (A:FOLDING WING LEFT PERCENT, percent)
        </Code>
        <Lag>400</Lag>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <MouseFlags>LeftSingle</MouseFlags>
      <TooltipID>TOOLTIPTEXT_FOLDING_COWLING_RELEASE</TooltipID>
      <CallbackCode>
        (&gt;K:TOGGLE_WING_FOLD)
      </CallbackCode>
    </MouseRect>
  </PartInfo>


Here is the subsections or GUID strings at the top of the sheet;


<Animation name="lhc_remove_cover" guid="8053AACA-1C53-474f-892C-BA5BAC815977" length="100" type="Sim" typeParam2="lhc_remove_cover" typeParam="AutoPlay" />
<Animation name="lhc_Vis_wing" guid="A58969AE-E474-47b9-B1A3-DD7EF03E6AE0" type="Sim" typeParam="AutoPlay" typeParam2="lhc_Vis_wing" length="100"/>
<Animation name="lhc_lever_toggle_cowlings" guid="65D7D61E-3843-412f-9A47-2E370D2C9449" length="100" type="Sim" typeParam2="lhc_lever_toggle_cowlings" typeParam="AutoPlay" />
 
I just realised..

The visibility has a key frame zone of 100, set at the GUID string.

Would that be causing this? Should it be 1?
 
Bill, pure <Visibility> scripts don't even need the <Animation...guid=xxx.../> section at all.

So now, having 100 or 1 will make no difference whatever. :D
 
Hi Bill
Code looks fine
As FrBill said you dont use a GUID for pure vis code, so remove that guid and try again.It may not matter but its also possible that the compiler is looking for kf in the vis code due to the guid and as there are not any its causing an error
its worth a shot anyway ;)
Wozza
 
Ok, how about this.

How could I write a 'zero speed' sensor Visibility lock?

Here's how the idea would work. Zero speed (zero knots) and the inner nose well and rear engine bay 'appear'. From 1 knot and up, the interiors disappear.

I think that would work.



I was rummaging through idea's and past code switches, like door closed sensor for the 'exit open' annunciator, which uses the airframe code 'exit open' and 'exit closed' flags. Same with the gear wells and things. They have built in sensors; ....open and ......closed. Thus they could be made to work. L var's do not seem to have sensors as such.

For example, how on earth could I make a sensor then that says the front nose compartment was open? Easy enough, the switch simply throws and the light either goes on or off. But with animations, the light goes on immediately while the animation 'continues' running. 'instant' versus 'animation'. Thus with vis, it is like light, instant gone, instant on.

I just still cannot believe I cannot get this to work the way I want it, but I am getting used to the limitations of FS... the 'no bill, this just aint GOING TO WORK FOR YOU!!!!!!!!!!!!!!!!!!!!!

<--- smacks head on desk
 
Hi Bill
Ok take a deep breath close your eyes and clear the mind :)
next start a new project in this project I want you to make an external model of 2 simple boxs
Make sure you can see both boxs in the scene at all times ie separate them so they are not on top or dont overlap one-another.
Give 1 box the animation name lhc_remove_cover and animate it so it moves up over and down,give the other box the name lhc_Vis_wing save compile to the orig aircraft.Now fire up fsx and in external mode use the default wingfold keys I think its shft+ctrl+s and watch what happens.
If its the same as my test project you should only see the box tagged lhc_remove_cover when you hit the wingfold keys you should then see the box tagged lhc_Vis_wing appear and stay visible till you retoggle the wingfold and the box tagged lhc_remove_cover returns to its orig position.
Try the above and report back what happens
Wozza
 
How could I write a 'zero speed' sensor Visibility lock?

That would not work reliably, since airspeed indication is driven by a pressure device (pitot tube) and is affected by ground winds...

Far simpler would be to use an on-ground condition.
 
Hey gang,


I am still working on this one. I had decided I didnt want the wingfold command on the compartments, and wish them to be seperate animations.

I was just thinking. What if these compartments were based on a visibility that is triggered by the landing gear being deployed? Take off, and the compartments disappear. Land and they are there.

Another would be emergency brake. You fly with that off, and when you are moving, its off... Park, and that is on.

I would probably have to have a over-ride for the actual door panel covers animations that would keep them closed if the parking brake was off. Turn the brake 'on' and the doors would then be allowed to open...

I like it! :D

<--- off to give it a try...
 
Back
Top