#✅ | c

1 messages · Page 1 of 1 (latest)

fading trench
#

tell me how to make this single line text fade out 40ticks without using any variables or tickers or the fade in/out thing

daring shadowBOT
# fading trench tell me how to make this single line text fade out 40ticks without using any var...

Spiffy/FancyMenu can’t animate a single-line text’s opacity over time “by itself” without some driver—either the built‑in fade option, a ticker/variable updating a placeholder, or some other time source. The element only evaluates its opacity when your layout reloads, so without using a ticker/variable (or enabling the fade feature) there’s nothing that ticks every frame to move the value from 1→0 over 40 ticks.

If you don’t want the fade feature, the only other way would be to have something changing a placeholder-driven opacity (e.g., a ticker increasing a timer variable) and feed that into the text’s opacity (see the Element Opacity docs for how placeholders can drive opacity). Without any of those time updates, you can’t get a 40‑tick fade.

fading trench
#

but the fade in/out thing doesnt work for my highlighted item name

daring shadowBOT
# fading trench but the fade in/out thing doesnt work for my highlighted item name

If the built‑in fade doesn’t work for your highlighted item name, you can still drive the text’s opacity with the highlighted_item_time placeholder so it drops from 1→0 over 40 ticks without any variables or tickers.

  1. Use a Single-Line Text element and set it to show the highlighted item’s name (e.g. {"placeholder":"slot_item_display_name","values":{"slot":"{"placeholder":"active_hotbar_slot"}"}}).
  2. Right‑click the element, go to Opacity → Set, and paste this placeholder expression:
    {"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"highlighted_item_time"} / 40"}}
    
    That divides the remaining highlight time by 40 to get a 0‑to‑1 value for opacity.
  3. Add a loading requirement (e.g. Is Number → bigger than 0) on highlighted_item_time so the text is only visible while the original highlight is active.
  4. If you need to keep the text hidden when the placeholder returns 0, the requirement handles that; otherwise the opacity expression already evaluates to 0 once the timer hits zero.

This way the highlighted_item_time counter (which ticks down every game tick) handles the fade duration for you without extra tickers or variables. You can read more about driving opacity with placeholders in the Element Opacity docs and about the highlight timer placeholder in the Placeholders page.

fading trench
#

OMG IT WORKS, but then it instantly pops back up again

daring shadowBOT
# fading trench OMG IT WORKS, but then it instantly pops back up again

That “pop‑back” is just Minecraft showing the vanilla highlighted name again once the timer runs out, because your custom text only fades while highlighted_item_time is >0. After it reaches 0, the vanilla highlight instantly kicks in again unless you hide it.

To keep your custom fade as the only text:

  1. Hide the vanilla highlight name by deleting it in the editor or using an Overlay Remover/layout requirement to block it. (See the Overlay Remover docs for how to remove built-in overlays.)
  2. Keep the opacity expression on your Single-Line Text:
    {"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"highlighted_item_time"} / 40"}}
    
  3. Add a loading requirement that only lets the element show while highlighted_item_time is >0.

Once the vanilla element is gone, your custom text stays faded out after 40 ticks instead of “popping” back.

fading trench
#

no just change the opacity expression to:
-keep the value at 0 after 40 ticks
-stay at opacity: 1 for 20 ticks, then fade down to opacity: 0 within the next 20 ticks, total 40 ticks.

daring shadowBOT
# fading trench no just change the opacity expression to: -keep the value at 0 after 40 ticks -s...

Use highlighted_item_time in a calculator placeholder so it stays at 1 for the first 20 ticks, then fades over the next 20 ticks, and automatically stays at 0 once the timer hits 0:

{"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"highlighted_item_time"} > 20 ? 1 : max(0,{"placeholder":"highlighted_item_time"} / 20)"}}

Right-click the Single-Line Text → Opacity → Set and paste that. It checks if the timer is above 20 (first 20 ticks) and keeps opacity 1, otherwise it divides the remaining ticks by 20 so it fades linearly to 0, and max(0, …) keeps it at 0 after the 40 total ticks are done. You can still keep a loading requirement on highlighted_item_time so the element only appears while the highlight is active.

More about driving opacity via placeholders: Element Opacity docs.

fading trench
#

think of another expression, the one you gave me just keeps it on max opacity at all times

daring shadowBOT
# fading trench think of another expression, the one you gave me just keeps it on max opacity at...

Ah, right—nested placeholders need to be inserted literally, so the expression should look like this (note how each placeholder is inserted as its own JSON snippet, not nested inside another string):

{
  "placeholder": "calc",
  "values": {
    "decimal": "true",
    "expression": "{"placeholder":"highlighted_item_time"} > 20 ? 1 : max(0, {"placeholder":"highlighted_item_time"} / 20)"
  }
}

This does:

  • highlighted_item_time > 20 → keep opacity 1 for the first 20 ticks,
  • else divide the remaining time by 20 so it linearly fades to 0,
  • max(0, …) keeps it at 0 once the timer hits zero (so it won’t pop back).

Paste that into Opacity → Set for your Single-Line Text. If you still see it stay fully opaque, double-check the placeholder is inserted via the editor’s placeholder picker so the internal JSON isn’t quoted twice. You can read more about using placeholders for opacity in the Element Opacity docs.

fading trench
#

didnt work, keep it simple like this {"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"highlighted_item_time"} / 40"}}
because i dont think ? works

daring shadowBOT
# fading trench didnt work, keep it simple like this {"placeholder":"calc","values":{"decimal":"...

You’re right—FancyMenu’s calculator doesn’t understand ? expressions, so the clean way is to clamp the fraction between 0 and 1. Use this for the opacity:

{"placeholder":"calc","values":{"decimal":"true","expression":"min(1,max(0,{"placeholder":"highlighted_item_time"}/20))"}}
  • When highlighted_item_time is >20, the division gives >1 and min(1,…) keeps it at 1 (first 20 ticks full opacity).
  • When it drops below 20, the fraction ramps from 1 down to 0 over those last 20 ticks.
  • max(0,…) ensures it stays at 0 after the timer hits zero.

Just paste that into Opacity → Set for your Single-Line Text. If you also want the element to disappear once the timer is done, keep an Is Number → bigger than 0 requirement on highlighted_item_time, and you’re good. You can find more about driving opacity with placeholders in the Element Opacity docs.

fading trench
#

the expression doesnt work

daring shadowBOT
# fading trench the expression doesnt work

Since the calculator placeholder can’t do conditionals directly, you can clamp the result with the math_min / math_max placeholders instead. Use this as the opacity value:

{
  "placeholder": "math_min",
  "values": {
    "num1": "1",
    "num2": {
      "placeholder": "math_max",
      "values": {
        "num1": "0",
        "num2": {
          "placeholder": "calc",
          "values": {
            "decimal": "true",
            "expression": "({"placeholder":"highlighted_item_time"}-20)/20"
          }
        }
      }
    }
  }
}

This keeps the value at 1 up to 20 ticks, then linearly fades to 0 over the next 20 ticks, and math_max/math_min keeps it clamped between 0 and 1 after that. Paste it into Single-Line Text → Opacity → Set and keep a loading requirement so the text only shows while highlighted_item_time is > 0.

fading trench
#

i think u need to use {"placeholder":"maxnum","values":{"first":"10","second":"15"}} like this

daring shadowBOT
# fading trench i think u need to use {"placeholder":"maxnum","values":{"first":"10","second":"1...

If you want the text to stay at opacity 1 for the first 20 ticks and then fade to 0 over the remaining 20 ticks, you can clamp the highlighted_item_time / 20 result between 0 and 1 using the maxnum/minnum placeholders. Paste this as the opacity value:

{
  "placeholder": "minnum",
  "values": {
    "first": "1",
    "second": {
      "placeholder": "maxnum",
      "values": {
        "first": "0",
        "second": {
          "placeholder": "calc",
          "values": {
            "decimal": "true",
            "expression": "{"placeholder":"highlighted_item_time"}/20"
          }
        }
      }
    }
  }
}
  • When highlighted_item_time is >20, the inner calc returns >1, so minnum(1, …) keeps the opacity at 1 (first 20 ticks).
  • Once the timer drops below 20, highlighted_item_time / 20 fades toward 0, and maxnum(0, …) ensures it never goes negative.
  • When the timer hits 0, the result is 0 and stays there.

Keep your loading requirement (e.g., Is Number → bigger than 0 on highlighted_item_time) so the element disappears after the fade, and you’re done! You can read more about these placeholders in the Placeholders docs and how opacity supports placeholders in the Element Opacity docs.

fading trench
#

{"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"highlighted_item_time"} / 40"}}

ok just fix this so that after that 40 ticks, it is on 0

daring shadowBOT
# fading trench {"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"h...

Use the maxnum placeholder to clamp the fraction so it never goes below 0. Replace your opacity value with this:

{
  "placeholder": "maxnum",
  "values": {
    "first": "0",
    "second": {
      "placeholder": "calc",
      "values": {
        "decimal": "true",
        "expression": "{"placeholder":"highlighted_item_time"} / 40"
      }
    }
  }
}

This keeps the opacity at the current fraction while highlighted_item_time is still positive, but once it hits 0 (after the 40 ticks), the maxnum(0, …) ensures the result stays at 0 forever. You can still keep a loading requirement to only show the element while highlighted_item_time is above 0.

fading trench
#

BRO I SAID USE THIS {"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"highlighted_item_time"} / 40"}} youre using the expressions before

daring shadowBOT
# fading trench BRO I SAID USE THIS {"placeholder":"calc","values":{"decimal":"true","expression...

You can keep your original "{"placeholder":"highlighted_item_time"} / 40" expression and just wrap it in a maxnum placeholder so the value never drops below 0 after the timer hits 0:

{
  "placeholder": "maxnum",
  "values": {
    "first": "0",
    "second": {
      "placeholder": "calc",
      "values": {
        "decimal": "true",
        "expression": "{"placeholder":"highlighted_item_time"} / 40"
      }
    }
  }
}

Paste that into Opacity → Set for your Single-Line Text. The maxnum keeps the result ≥0, so once the highlighted timer reaches 0 (after the 40 ticks) the opacity stays at 0 instead of popping back up. If you also want the element to vanish when the timer ends, keep an Is Number → bigger than 0 requirement on highlighted_item_time. You can read more about driving opacity with placeholders in the Element Opacity docs.

#
Thread Marked as Solved

This support thread has been marked as solved by @fading trench.

The AI helper is now disabled, but you can still continue the conversation if needed. Thank you for using our support system!