• 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 VC Effect

Messages
468
Country
ca-ontario
I am trying to trigger an effect (as in a .fx file) in the VC but I am not sure just how to go about writing the code in the model.def file.

I know I need to use the Attach Point tool to attach the effect but it is the Mouse Rectangle section that has me confused as that only lets you assign previously defined rectangles.

How do you code the mouse rectangle so that it can be attached to a part to trigger an effect?
 
Polygons tagged with an attached .fx file are quite invisible in the sim. You can't have a mouse point on something invisible...

You can however script a mouse point to any object that can be seen. That's why for a disappearing yoke I'll pick something else on the panel for the mouse control, such as the gasper vents. :D
 
I have a visible part I want to click on and could make a tiny poly to attach the fx to (like I did for the landing lights), the problem is I am not sure how to write the code for it as it would basically just be the mouse info.

The scenario I'm after is click on a part and the effect is triggered, I just don't know how to set that up and searches I've done so far haven't come up with an answer.
 
I have a visible part I want to click on and could make a tiny poly to attach the fx to (like I did for the landing lights), the problem is I am not sure how to write the code for it as it would basically just be the mouse info.

Larry, it's just as simple as a <Visibility> type definition, since it does not require an <Animation Name=... GUID=xxx.../> entry either!

In fact, you can simply combine both the <Visibility> and <MouseRect> into the same <PartInfo> definition. Here for example is a simple "Hide Yoke" script. To use, simply tag the part to be hidden (yoke) with the <Visibility> condition, and tag the part for the mouse with the <MouseRect> definition:

Code:
  <PartInfo>
    <Name>Hide_yoke</Name>
    <Visibility>
      <Parameter>
        <Code>
            (L:YokePilot,bool)  !
        </Code>
      </Parameter>
    </Visibility>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <TooltipText>Hide Pilot's Yoke</TooltipText>
      <CallbackCode>
        (L:YokePilot,bool) ! (&gt;L:YokePilot,bool)
      </CallbackCode>
    </MouseRect>
  </PartInfo>
 
Last edited:
I am already using that script to hide/show the yokes Bill. The thing is I don't have anything to hide in this situation, I just need somewhere to click to trigger an effect.

Thinking about it for a while I guess I can have a tiny poly that I can hide located out of sight (i.e. inside another part) and add the .fx tag to the same part I make into the mouse-able item.
 
Clue: when some object is "unhidden" the .fx should fire until that object is "hidden" again.
 
I am using a modified version of your 'hide yoke' code Bill (modified in the sense of part name and L:var) but while I can get the mouse to change to a hand on the target part the effect file is never triggered.
 
What is the effect? Not all effects will be visible from inside the model.
 
I've come to the conclusion that you are correct Bill. I just tested it in FSX using the effects tool and while the effect shows perfectly from outside view it cannot be seen in the VC which is where I want it to appear.

The effect is a custom one modified from the default 'flour bomb' effect and I am guessing 'smoke' is one of those things that will not show in the VC. :(

Oh well, it's not a show stopper but was intended to be a sort of 'Easter Egg' as a surprise for people who click on things in the VC just because they can. :D

The effect was supposed to be triggered by clicking on the safety pin on a fire extinguisher which then fills the VC with white smoke like a CO2 bottle going off.
It was just a bit of fun suggested by one of my beta testers and I've learned a few things getting this far so it wasn't a total waste of time and effort.

Maybe I can just trigger the custom sound effect instead of having the smoke effect and label it as a halon extinguisher.........hmmmmmmm. :idea::stirthepo
 
Last edited:
I found out (the hard way) that even with parts using a 'invisible texture' are still clickable in the VC.

Another famous one that is not well know. The prop in the A2A high detail Super Cub has to be hand started. You do this by proping the propeller by hand (mouse drag) through the window. You actually have a invisible polygon hovering in the window area and you mouse drag that to start the engine.

So invisible polygons are possible to mouse over. They also block anything that is ahead of them, if in the middle between you and other switches, so placement is important.



Bill
 
Back
Top