Profile image

Color tags support Selection Operators!

5,482 Timplanes  2.0 years ago

People probably figured this out months ago, but I’ll share this anyways. The syntax has to be right, but it works!

Here’s example code:

<color={Activate1 = 1 ? "#ffff00ff" : "ffffffff"}>YourTextHere

If group 1 is on, the text should be yellow, and white if group 1 is off.

I’ll be definitely using this feature more to make nice buttons with built-in indicators in my cockpits.

Images:

(custom landing gear indicators that I made)


  • Log in to leave a comment
  • Profile image
    1,971 SirRhyvs

    T

    2.0 years ago
  • Profile image
    11.5k JesusChrist

    @PlaneFlightX Yes, that is what i assumed when i saw this post, i just used <size> as an example to test if it would work.

    2.0 years ago
  • Profile image
    46.6k PlaneFlightX

    @DeveloperKorzalerke They work with all tags.

    2.0 years ago
  • Profile image
    11.5k JesusChrist

    Can confirm it does work with <size>, here's an example code:

    <size={Activate1 ? 4 : 2}><color={Activate1 ? "#FF00FF" : "#FFFFFF"}>TeST</color></size>

    Normally it just displays the word "TeST", but if you enable AG1 the text turns large and pink, pretty cool discovery, i don't recall seeing this before.

    Edit: This code also works but it's a bit longer: {Activate1 ? "<size=4>" : "<size=2>"}{Activate1 ? "<color=#FF00FF>" : "<color=#FFFFFF>"}TeST</color></size>

    +1 2.0 years ago
  • Profile image
    5,482 Timplanes

    Hmm, that’s interesting

    2.0 years ago
  • Profile image
    11.5k JesusChrist

    @X99STRIKER Yeah the tag is sent with the comment, if you add them on a edit it won't work.

    2.0 years ago
  • Profile image
    11.5k JesusChrist

    @Timplanes Btw i'm pretty sure tags don't work if you add them on a edit, you need to add them when sending the comment or else they won't work.

    2.0 years ago
  • Profile image
    11.9k X99STRIKER

    @Timplanes
    I didn’t get tagged from that…

    2.0 years ago
  • Profile image
    5,482 Timplanes

    @X99STRIKER Yes, the screenshots are from a small turboprop I’m working on.

    2.0 years ago
  • Profile image
    11.5k JesusChrist

    This probably also works with other tags like <size> and <alpha>, seems pretty useful.

    2.0 years ago
  • Profile image
    11.9k X99STRIKER

    Is this a plane your gonna upload?
    T

    2.0 years ago
  • Profile image
    11.9k X99STRIKER

    Idk what this is but it looks advanced so ima upvote.

    +1 2.0 years ago
  • Profile image
    35.3k V

    I did not know this, thanks for the info

    2.0 years ago
  • Profile image
    46.6k PlaneFlightX

    Please tag me on anything you post. If you ever need help, also tag me.

    +4 2.0 years ago