• 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 Strings that move?

Messages
206
Country
unitedkingdom
Hi folks,

In FS9 XML, can I assign a <shift> value to a text object (preferably <FormattedText>). If so, where is it's axis, or can I set that too? I cannot seem to find any examples but then I may be searching in the wrong way...

What I want to do, is have the real numbers showing in (on) my V1,2,R,Ref bugs in my PFD as they move along the speed tape...

Cheers,
Geoff
 
I am not sure this is possible and is exactly why my current project is in FSX schema. I much prefer FS9 schema but every time I have ever tried this, I have no luck. That being said, I certainly don't know all the tricks so someone may have some sort of work around.
 
Got it working! Found some examples with FSX usage and just tried them in FS9 - all good! Just needed a little tweak to get it sitting in the box...

Code:
<Element>
<Visible>(L:ApproachBugs, bool)</Visible>
<Position X="11" Y="205"/>
<Clip Left="4" Top="70" Right="103" Bottom="340"/>
<FormattedText X="25" Y="60" Font="Arial" FontSize="22" Adjust="Center" Color="white" VerticalAdjust="Center" Bright="Yes">
<String>%((L:BugVREF, enum))%!3d!</String>
</FormattedText>
<Shift>
<Value Minimum="-56" Maximum="58">(A:Airspeed select indicated or true, knots) (L:BugVREF, enum) - 6 -</Value>
<Scale Y="2.500"/>
</Shift>
</Element>

Geoff
 
I know full well that I copy/pasted an example in this thread yesterday, and saw that it actually got posted...

...but now today when I look? Poof! It's gone! :confused:

Anyway, since you figured it out, there's no point now in my looking it up again and reposting my example...
 
I am not sure this is possible and is exactly why my current project is in FSX schema. I much prefer FS9 schema but every time I have ever tried this, I have no luck. That being said, I certainly don't know all the tricks so someone may have some sort of work around.

There are only two things that may be done only in FSX's schema:

  1. dynamic ARC drawing
  2. dynamic PIE drawing

Everything else is possible, and even uses fewer lines of script... ;)
 
Interesting. I actually do prefer FS9 xml since it is so much cleaner and I have so much more experience with it... I don't really have to think twice when looking at it. I just started a new FSX project but I think I may restart it in FS9 schema now since it was going to involve moving text items...

One thing I can't seem to work out right now is how to get rotating text to work around a compass rose- I believe it has been referred to as the ferris wheel effect. Should be simple, rotate the text using a parent element around the rose and then rotate it the opposite direction in the text element but my 'N' just spins in place. This effort was in FSX schema, and not a project I want to go back and re-write!!!
 
Its a neat little trick. Instead of using rotates you just use 2 shifts. One for the X and one for the Y.

The Y shift script is:

-Radius * cos(heading - compass point)

The X shift is:

-Radius * sin(heading - compass point)

Little trick I learned from a genius guy while working on a little EFIS display.
 
Its a neat little trick. Instead of using rotates you just use 2 shifts. One for the X and one for the Y.

The Y shift script is:

-Radius * cos(heading - compass point)

The X shift is:

-Radius * sin(heading - compass point)

Little trick I learned from a genius guy while working on a little EFIS display.

Nice trick! I did a gauge that used "ferris wheel" compass labels and I did it by using MANY nonlinear entries on the shifts. When I say MANY I mean 12 labels, 36 non-linears each (split the compass into 10 degree sections). Even that technically made a 36 sided polygon that the labels traveled around, not a true circle.

Now that I have seen the sin/cos math, it make perfect sense...I guess when you haven't used trig since high school, you forget the fundamentals.

I am going to make a wiki entry about this one!
 
!!! I can't make this work. I am using FSX schema and was attempting to use a top and left script on the element but even using shifts the N just sits there... this gauge has caused me more head aches than any other.

Edit: this has to be the way sin and cos are used because anytime I add them to the equation I get 0 back regardless. This is frustrating.

EditedEdit: It was the way I was using the sin and cos- I've got it now. I was trying to use the sin and cos as numbers and not operators like they really are. The SDK says you need to input radians so when you are doing anything but north you have to use degrees to create the offset then convert to radians so I am using this:
Code:
(A:Plane heading degrees gyro,degrees) 60 - dgrd sin
for the 60 mark for example. the 'dgrd' operator converts the degree offset to radians for the sin operator to use properly. I am sure some of you knew this all along but if some one was struggling such as myself, that is the plain and up front way to make it work.
 
Last edited:
Back
Top