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

Basic Trigger Gauge -- need some assistance

1. Are you actually modelling this carrier? If so are you reanimating the elevator to 360 keyframes? If you are using ModelConvertorX and just modding the animation XML then you must remain with the 0-100 keyframes originally animated into the model.

2. Gauges run at 18hz so when you trigger the animation via the gauge you would want it "run up" and "run down" hence the addition/subtraction of a fixed number which is adjustable for your animation speed needs.

3. min = take the last 2 numbers in the stack and keep the lesser of the 2. It acts as a "ceiling".
max = take the last 2 numbers in the stack and keep the greater of the 2. It acts as a "floor".
Code:
(L:CVelevator) 1 + 360 min (>L:CVelevator)
means add 1 to the variable now stored, check that it doesn't go above 360 then store the new value into the variable.

For modelling the carrier yourself at 360 frames use the code in post #8 above.

If you are using MCX and reanimating via the export animation XML then you must remain with 100 frames. It seems this is the case.

Code:
<Gauge Name="CarrierElevator" Version="1.0">
    <Element>
        <Select>
            <Value>
                (A:LIGHT PANEL,bool) 1 ==
                if{ (L:CVelevator) 1 + 100 min (&gt;L:CVelevator) }
                els{ (L:CVelevator) 1 - 0 max (&gt;L:CVelevator)  }
            </Value>
        </Select>
    </Element>
</Gauge>
 






Again the NAV LIGHT variable did the trick, but the Panel Light didn't work. Gauge code same in every regard other than the A: Variable used.

But whatever, this is progress.
 
1. Are you actually modelling this carrier? If so are you reanimating the elevator to 360 keyframes? If you are using ModelConvertorX and just modding the animation XML then you must remain with the 0-100 keyframes originally animated into the model.

No this is my model exported from blender. I created the animation tags that you see in post 11 (with some help).


2. Gauges run at 18hz so when you trigger the animation via the gauge you would want it "run up" and "run down" hence the addition/subtraction of a fixed number which is adjustable for your animation speed needs.

Alright. I don't think I'll need that but I appreciate it. I can understand why you would want this, if somebody was indeed limited to a 100 frame animation. That is cool, and I may revisit this for another animation project in the future (deck crew).


If you are using MCX and reanimating via the export animation XML then you must remain with 100 frames. It seems this is the case.

That is a negative, sir.

I am using MCX, but initially I animated it in Blender and used a customer animation tag. I used MCX to make the platforms move with the animation (learned in another thread).
 
Last edited:
This is the code that worked for me:

Code:
<Gauge Name="CarrierElevator" Version="1.0">

    <Element>
        <Select>
            <Value>
                (A:LIGHT NAV,bool) 1 ==
                if{ 360 (&gt;L:CVelevator) }
                els{ 0 (&gt;L:CVelevator) }
            </Value>
        </Select>
    </Element>

</Gauge>

OK thanks fellas. You helped me at least think this through, and I learned a lot.
 
Odd, I would assume that the elevator would move instantly up and down with that code. I would need a Lag statement to make it move smoothy. Weird.
 
Lag is built into the animation tag, and the animation tag is set to 360 key frames (I posted it in post #11).
 
OK now for part #2 of my lesson (and thanks again guys)

Let's say I don't want to use an A: trigger. Let's say I want to create some other variable and set it to 0 or 1, and use that as my trigger. Something like if L:VARwhatever is true, then do L:CVelevator, just like the code above. Then I will try to figure out how to use a mouse click trigger on a small 2d panel to set that L:VARwhatever to 1.

How would I go about doing that? I am guessing that I need to first define that new custom L:VARwhatever as zero, would I not?
 
I am guessing that I need to first define that new custom L:VARwhatever as zero, would I not?
All L:Var values are zero when the gauge initially loads - you don't need to define it as zero at the start.

[edit] If you're not using one already, you might find it very useful to install a gauge monitor tool such as Robbie McElrath's BlackBox3, Doug Dawson's xml_vars, or better yet, Tom Aguilo's XMLTOOLS (see the LOCALVARS Class) as this one can readback model (.MDL) L:Vars. All of these tools can be freely downloaded.

Bob
 
Last edited:
To use an L: variable it's as simple as replacing in your code above:

(A:LIGHT NAV,bool) 1 ==

with:

(L:MyVariable, bool) 1 ==

That's it.

Then create the 2D gauge that changes the value of this L: variable from 0 to 1 and back again.
 
Back
Top