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

FS2004 Auto Flaps

Messages
1,749
Country
unitedstates
I am trying to make a gauge that is normally simple. This gauge is giving me trouble. Could someone please correct what i am doing wrong!

The purpose of this gauge is to have the flap_3 or full flaps when on ground.

Here is my gauge that does not work.

<Gauge Name="ground" Version="1.0">

<Element>
<Select>
<Value>
(A:SIM ON GROUND,bool) if{ (A:FLAPS NUM HANDLE POSITIONS, Number) 3 }
</Value>
</Select>
</Element>

</Gauge>

Thanks :eek:
 
Last edited:
A: are READ ONLY variables!

You need to use the
>K: command tokens instead!

(A:FLAPS NUM HANDLE POSITIONS, Number) 3

will do absolutely nothing because it's not a command.

(>K:FLAPS_3) // sets flaps to position #3

-or-

(>K:FLAPS_DOWN) // sets flaps to full down

-or-

-16383 (>K:FLAPS_SET) // sets flaps to full down
 
Thanks

Thanks Bill,

I did try to use L K and A.
Because my 2D gauge i made uses FLAPS_3.

So I tried this way once!
(A:SIM ON GROUND,bool) if{ (&gt;K:FLAPS_3) }

So I was close. Why do you use this key for > ?

Heres what i will try first!

(A:SIM ON GROUND,bool) if{ (>K:FLAPS_3) }
 
Worked first try!

Worked the first try!

I knew i was close when i tried the K before.

Anyways I will be back to read what the this symbol means: >
Hope you can post info on that.

Thanks Bill

Sincerely Delivery Guy,
 
Thanks Bill,

So I was close. Why do you use this key for > ?

Heres what i will try first!

(A:SIM ON GROUND,bool) if{ (>K:FLAPS_3) }

Actually &gt; and > are the same thing! There's no technical term for the symbol, but I think of it as a "execute the following command..."

For all practical purposes, just remember that you can't use K: without the >...

...so it's always >K:

Now, to keep from having that command sent continuously, let's add a condition to guarantee it will only be done once!

Code:
(A:SIM ON GROUND,bool) 
(A:TRAILING EDGE FLAPS LEFT PERCENT,percent) 100 !=
and
if{ (>K:FLAPS_3) }

So, if the a/c is on the ground and the flaps are NOT down, then set FLAPS_3. ;)
 
I think of it as "load a value into the command, and execute it". The arrow reminds me of a load command - the execute command just comes along with it. :)
 
Thanks

I like that rule... Always goes with K....>K

Plus if it's an execute operation, then no need to use it on A.

So K executes and A reads...What does L do?

By the way, I don't need a one time execute for my skydiver project.
So it worked perfectly.

But if we did decide to execute one time...How do we do that? By adding a (A:READCODE)? And using (AND) (IF)
Then it's only 1 time?


DG,
 
Last edited:
Another Problem

Can you guys help me with a 3 way switch. usually i have no problem.
This one I have tried several ways and I only get 2 lights instead of 3.

Here is what i wrote for a 16 gallon max.
<Element>
<Select>
<Value>(A:FUEL TOTAL QUANTITY, Gallons) 3 &lt; (A:FUEL TANK LEFT MAIN LEVEL, Percent) 3 &lt;</Value>
<Case Value="0">
<Image Name="add_fuel.bmp" ImageSizes="80,96,80,96"/>
</Case>
</Select>
</Element>

<Element>
<Select>
<Value>(A:FUEL TOTAL QUANTITY, Gallons) 4 &gt; (A:FUEL TANK LEFT MAIN LEVEL, Percent) 8 &lt;</Value>
<Case Value="0">
<Image Name="fuel_low.bmp" ImageSizes="80,96,80,96"/>
</Case>
</Select>
</Element>

<Element>
<Select>
<Value>(A:FUEL TOTAL QUANTITY, Gallons) 9 &gt; (A:FUEL TANK LEFT MAIN LEVEL, Percent) 9 &gt;</Value>
<Case Value="0">
<Image Name="fuel_ok.bmp" ImageSizes="80,96,80,96"/>
</Case>
</Select>
</Element>

<Mouse>
<Area Left="10" Top="36" Width="60" Height="60">
<Tooltip>Add Fuel</Tooltip>
<Cursor Type="Hand"/>
<Click Event="ADD_FUEL_QUANTITY"/>
</Area>
</Mouse>


Since i write them from scratch I used 3 elements instead of using 3 cases. I am not so good on writing the value in 1 code.....I figure Bill will use this method!


Thanks DG,:eek:
 
Last edited:
ISo K executes and A reads...What does L do?

By the way, I don't need a one time execute for my skydiver project.
So it worked perfectly.

But if we did decide to execute one time...How do we do that? By adding a (A:READCODE)? And using (AND) (IF)
Then it's only 1 time?

L: are Local variables that you can create for your own needs. For example I could create a custom variable named (L:MyVariable,bool) if I wished to.

It is very BAD practice to have your script continuously execute. Among other things, it can actually slow things down, and even block some other commands from being executed, such as open door #2...

I already told you how to do just that! Read my previous reply... :D
 
Ok

Hi Bill,

This is when the parachute guy hits the ground. So doesn't matter if it slows anything down. They need to select another aircraft anyways. Plus the whole point is to keep it continues so the skydiver does not disappear when the user clicks the flaps back up.

So that's why I will normally make it a one time operation. I am making notes to remind me of methods to use. They are not too hard to write as long as you know what type you want.....

thanks Bill...
 
Delivery Guy,

You asked what A was, that is basically Airframe; anything associated with the aircraft, such as 'on the ground, engine running, door open, flaps up', etc.

K is keyboard.
 
thanks

Thanks Lionheart

I have a rule for each.

A = read only
L = custom
k = keyboard
>k = execute

thanks for all the help guys....

Would be great if someone could post a list like i made, but for other rules.

1 time........................( ? ) if{ ? }
continuously................( ? ) 100 != and if{ ? }

feel free to add rules with a reply! I could use the help, now that i write from scratch....


DG,:eek:
 
Last edited:
Gauge Parameters ( G: )

Key Parameters ( >K: )

Local Parameters ( L: )

Mouse Parameters ( M: )

Resource strings ( R: )

Environment Parameters ( E: )

Program Parameters ( P: )

I would also point out that 90% of what you need to know is in the FSX SDK... ;)
 
Just to add a sub note to Bill's explanation.

For any aircraft with multiple gauges, G variables can only be read within the gauge in which they are coded so they are Gauge (G) specific, L variables can be read by any gauge in the aircraft so they are Local (L) to the aircraft. Means you can code an L variable one time in one gauge and the result is then available to all other gauges in that aircraft.

Roy
 
Back
Top