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

FSXA Effects and gauges

Messages
378
Country
unitedstates
Is it possible to play an effect with a gauge with conditions? I know you can attach an effect to an animation in the animation manager.

I need to be able to increase the flaps position and play an effect only when the aircraft is above 100ft AGL.

To my mind it would be something like :

<CallbackCode (>K:FLAPS INCR) 0 if { (A:Radio Height, feet) 100 > { (play effect)}} els </CallbackCode>

but I have no idea how to tell the sim to trigger fx_whatever.fx.

Am I close?

Jim
 
If you are building an FSX model, you could attach your .fx to a tiny control node and then trigger the control node's visibility using an L:var...

If you aren't doing this for FSX and/or don't have control over the model, I don't know of any technique that would work.
 
Thanks for that Bill, it threw me in a different direction. :)

The gauge/animation is to release ballast on a dirigible I am helping to build. I did the VC. I do have the entire model, so I can make attachpoints where needed, etc.

When you "Up Ship" in a dirigible, all your initial ballasting is taken care of before you take off. You do this so you won't drop tons of water on your unsuspecting ground crew. :) After you are above 100 ft, the ballast water disperses enough so, at worst, someone will get an extreme shower.

The closest I could think of for an animation that takes that situation into account is to only visibly drop ballast above 100 ft. Ballast is controlled by flaps position. The ballast effect trigger currently resides in the smoke system and I am controlling it (not as well as I want to) by toggling smoke on/off via the following code:

Code:
  <PartInfo>
    <Name>flapsinc</Name>
    <AnimLength>50</AnimLength>
     <Animation>
         <Parameter>
             <Sim>
                 <Variable>FLAPS HANDLE PERCENT</Variable>
                 <Units>percent</Units>
                 <Scale>.5</Scale>
             </Sim>
             <Lag>400</Lag>
          </Parameter>
     </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <MouseFlags>LeftSingle</MouseFlags>
      <CallbackCode>
         (&gt;K:FLAPS_INCR) 0 (A:RADIO HEIGHT,feet) 100 > if{ (>K:SMOKE_ON) 0 (>K:SMOKE_OFF)}  els
      </CallbackCode>
    </MouseRect>
  </PartInfo>

Sure enough, when the ship gets above 100 ft, the next flaps increase will trigger the ballast effect.

ONCE

I can toggle the smoke system manually for multiple displays.

What I would like to do is play the effect every time flaps are increased above 100 ft.
 

Attachments

  • flapshandle.jpg
    flapshandle.jpg
    93.5 KB · Views: 542
Do you absolutely have to use keyboard control? Were it me I'd opt to use custom L:vars to control the effect(s). Did you know that you can control up to 99 separate "things" using the smoke system?

There was an interesting discussion at AVSIM a few years ago. We recreated the "light panel" used on the helo used in "Independence Day."
 
I don't really have to use the keyboard, but I've never used an L:var, and I'm stretching my (lack of) programming skils to the limit :)

Jim
 
L vars are very easy - they are just like A vars, except you can write to them, called anything you want, use any units you want and are created by you.
 
Thanks! I've been studying and have successfully used L:Vars in a few situations now, and am working up to the logic that it will take to do what I need to do. If...then...els nesting is my next nemisis. :)

Jim
 
Back
Top