Profile image

H e l p , I h a v e p r o b l e m w i t h t e x t

57.6k ZeroWithSlashedO  2.7 years ago

So, I have a text.
And I want it to display a target's distance(in nmi, which is m/s divided by 1852) when a target is selected, and when it's not selected, it displays nothing. And, the distance is displayed only on 2,1 digits.

So my current funky tree is:
{TargetSelected ? TargetDistance/1852;00,0 : "!"} (the exclamation mark is for the sign if it's working or not)

But, it didn't work.
If you're asking why I asked, I'm making a c-scope radar display with texts.

Please help.

  • Log in to leave a comment
  • Profile image
    49.3k PlaneFlightX

    @FeatherWing I was talking about the radar c-scope thing I do not know about lol.

    2.6 years ago
  • Profile image
    23.5k FeatherWing

    @PlaneFlightX
    wut...
    I can only speak one or two words of Japanese...

    2.6 years ago
  • Profile image
    49.3k PlaneFlightX

    @FeatherWing The first time I was called over here a month ago, I understood the problem. Now you spoke Japanese and I do not know what you are talking about.

    2.6 years ago
  • Profile image

    @FeatherWing
    Ik about that
    I just wanted to try something else

    2.7 years ago
  • Profile image
    23.5k FeatherWing

    @PlaneFlightX @hpgbproductions
    One problem with what you two said is that the C-scope doesn't display target distance/range, only the direction it is relative to the radar.

    2.7 years ago
  • Profile image

    Use alpha to hide elements you don't want to use
    <alpha=#{TargetSelected ? "FF" : "00"}>
    .
    Add leading zero
    {TargetDistance/1852 < 9.95 ? "0" : ""}
    .
    Writes the target distance with 1 d.p.
    {TargetDistance/1852 ;F1}
    .
    Good practice to close style tags when you're done with them
    </alpha>
    .
    Text after ; is for format specifiers, there should only be one letter and 1-2 digits

    2.7 years ago
  • Profile image

    @PlaneFlightX
    Oh ok :(
    I guess back to dot as target then :(

    2.7 years ago
  • Profile image
    49.3k PlaneFlightX

    Labels don't support a hybrid of displaying a string and a funky code. What I mean is the boolean selector you've got there is using one string (when it's off), and a funky trees expression when it's on. I would say have the label on a piston which extends when the system is turned on. Have the label itself always display the target's distance.

    2.7 years ago