#✅ | more continuation

1 messages · Page 1 of 1 (latest)

simple nexusBOT
#

Looks like the overlay is now hiding because the opacity expression hits 0 instantly once health_flash_post_timer is still 0, so you never see the drop fade out. Try these steps:

  1. Loading requirement – make sure it checks health_flash_post_timer > 0 (or remove it) so the element can still exist while the post timer runs. If it still checks health_flash_timer, the overlay gets deleted as soon as the flash ends.

  2. Verify the timer – add a temporary Text element with {"placeholder":"getvariable","values":{"name":"health_flash_post_timer"}} so you can see it climb from 0 to 5 (or whatever value you expect) after taking damage.

  3. Use a smoother fade – the expression you posted only fades over five ticks, which is why it feels too fast. Try something like this instead (uses calc + minnum/maxnum to clamp between 0 and 1):

    {
      "placeholder": "minnum",
      "values": {
        "first": "1",
        "second": {
          "placeholder": "maxnum",
          "values": {
            "first": "0",
            "second": {
              "placeholder": "calc",
              "values": {
                "decimal": "true",
                "expression": "(5 - {"placeholder":"getvariable","values":{"name":"health_flash_post_timer"}}) / 5"
              }
            }
          }
        }
      }
    }
    

    This keeps opacity at 1 while the timer is 0, then slowly fades out over 5 ticks (you can increase the 5 to stretch the fade). If you’d rather keep the original format with max(0, …), just wrap it in maxnum and minnum per the placeholder docs so it can’t drop below 0 or above 1.

Let me know if you want me to tweak that expression for a longer fade or combine it with a delay.

spark rover
#

how can i increase the post timer so it isnt only 5?

simple nexusBOT
# spark rover how can i increase the post timer so it isnt only 5?

You can just extend the health_flash_post_timer range inside whichever action/script is controlling it (probably a ticker or the damage-detection script).

  1. Find the action that resets/starts the timer—likely a Ticker or button action that sets health_flash_post_timer to 5 when health drops.
  2. Change that value to whatever length you want (e.g. 10 or 20 ticks) so the fade plays out longer.
  3. If the timer is counting down elsewhere, make sure the countdown step still decrements every tick until it hits 0.

If you need help locating the action, open the action script editor for the element that fires on damage (the one that sets the variable) and look for the Set Variable Value action. Change the value there and save.

spark rover
#

the damage overlay now shows up for one tick then immedietly disappears, how can i fix that?

simple nexusBOT
# spark rover the damage overlay now shows up for one tick then immedietly disappears, how can...

It disappears because the overlay is still gated by health_flash_timer > 0, so as soon as the flash ends the element vanishes—even though the post timer is running. Remove that requirement (or switch it to health_flash_post_timer > 0) and let the opacity handle the fade instead. That way it stays loaded while the post timer counts down, and you can make the fade controlled by your opacity expression.

If you want it to stay visible for a fixed number of ticks before fading, extend health_flash_post_timer’s start value (e.g. set it to 10 or 20 in the action that kicks off the timer) and make your opacity expression divide by the same number. That gives you a longer, smoother fade without the element disappearing instantly 😊

spark rover
#

where in this action script can i extend the post timer?

▶ IF (Is Number: {"placeholder":"current_player_health_percent"} < {"placeholder":"getvariable","values":{"name":"prev_health_percent"}} AND Is Number: {"placeholder":"getvariable","values":{"name":"health_flash_timer"}} = 0)
└─ Set Variable Value: health_flash_timer:{"placeholder":"getvariable","values":{"name":"health_flash_duration"}}
└─ Set Variable Value: health_flash_alpha:1

▶ IF (Is Number: {"placeholder":"getvariable","values":{"name":"health_flash_timer"}} = 0)
└─ Set Variable Value: prev_health_percent:{"placeholder":"current_player_health_percent"}
└─ Set Variable Value: health_flash_post_timer:{"placeholder":"minnum","values":{"first":"5","second":"{"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"getvariable","values":{"name":"health_flash_post_timer"}} + 1"}}"}}
▶ ELSE
└─ Set Variable Value: health_flash_post_timer:0

▶ Set Variable Value: health_flash_timer:{"placeholder":"maxnum","values":{"first":"0","second":"{"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"getvariable","values":{"name":"health_flash_timer"}} - 1"}}"}}
▶ Set Variable Value: health_flash_alpha:{"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"getvariable","values":{"name":"health_flash_timer"}} / {"placeholder":"getvariable","values":{"name":"health_flash_duration"}}"}}

simple nexusBOT
# spark rover where in this action script can i extend the post timer? ▶ IF (Is Number: {"pla...

You already have the post timer being capped with minnum, so just bump that first value to as many ticks as you want it to run:

Set Variable Value: health_flash_post_timer:
{"placeholder":"minnum","values":{"first":"10","second":"{... + 1}"}}

Change the 5 to 10, 20, etc. (matching whatever duration you want). If you also want the fade to stay longer, divide your opacity expression by the same number so it fades over that new span.

spark rover
#

the damage overlay will show up upon damage then disappear with no fade after 1 tick

simple nexusBOT
# spark rover the damage overlay will show up upon damage then disappear with no fade after 1 ...

The overlay disappears because the layout still uses health_flash_timer > 0 as a loading requirement—so as soon as the flash timer hits zero the entire element unloads and there’s no fade left to display. Remove (or replace) that requirement so the overlay stays loaded while health_flash_post_timer counts down, and let opacity handle the fade instead.

Steps:

  1. Right-click the element → Loading Requirements → remove the health_flash_timer > 0 check (or swap it for health_flash_post_timer > 0 if you still want it hidden when the post timer is zero).
  2. Make sure health_flash_post_timer actually increments after the flash (your script already adds minnum(first=5,… +1)—increase that first value to your desired tick length so the fade lasts longer).
  3. Use a calculator-based opacity expression that normalizes the post timer range (see the placeholders docs for calc, maxnum, etc.). For example, keep opacity at 1 while the timer is zero and gradually fade to 0 over the post duration:
    {
      "placeholder": "minnum",
      "values": {
        "first": "1",
        "second": {
          "placeholder": "maxnum",
          "values": {
            "first": "0",
            "second": {
              "placeholder": "calc",
              "values": {
                "decimal": "true",
                "expression": "(desired_duration - {"placeholder":"getvariable","values":{"name":"health_flash_post_timer"}}) / desired_duration"
              }
            }
          }
        }
      }
    }
    
    (Replace desired_duration with whatever tick count you chose.) That keeps the overlay visible while the timer runs and lets it fade smoothly instead of vanishing after 1 tick.
spark rover
#

what if i dont want it to fade away anymore and simply slide down into the current health bar?

simple nexusBOT
# spark rover what if i dont want it to fade away anymore and simply slide down into the curre...

If you want the overlay to slide down instead of fading, you can drive its position with the timer variable instead of changing opacity.

  1. Keep the overlay loaded while health_flash_post_timer runs (remove the health_flash_timer > 0 requirement or replace it with health_flash_post_timer > 0), so it stays in the layout long enough to slide.

  2. Control the Y-offset via advanced positioning: right-click the overlay → Advanced Positioning, and set the Y offset to something like

    {"placeholder":"calc","values":{"decimal":"true","expression":"-10 + ({"placeholder":"getvariable","values":{"name":"health_flash_post_timer"}} * 2)"}}
    

    Adjust the base value and multiplier so the element covers the health bar and then moves down into place. The calculator placeholder lets you turn the timer into pixels.

  3. Animate the timer the same way you do for the post-fade, but instead of using it for opacity, keep the value ticking down while the element moves. You can also use a Ticker to update a separate variable (e.g. health_flash_slide) if you want finer control.

If you need help building the expression or want to combine it with an Element Animator for smoother motion, the Advanced Positioning & Sizing guide is a good reference: Advanced Positioning & Sizing.

spark rover
#

rebuild the expression so that it uses the overlays anchor and the overlay is loaded during the health_flash_timer AND post timer

simple nexusBOT
# spark rover rebuild the expression so that it uses the overlays anchor and the overlay is lo...

Here’s how to keep the overlay loaded while either timer is running and make it slide down from its anchor instead of fading:

  1. Keep the element loaded
    In your action script, add a new Set Variable Value after updating the timers:
    {
      "placeholder": "maxnum",
      "values": {
        "first": "0",
        "second": {
          "placeholder": "calc",
          "values": {
            "decimal": "true",
            "expression": "{"placeholder":"getvariable","values":{"name":"health_flash_timer"}} + {"placeholder":"getvariable","values":{"name":"health_flash_post_timer"}}"
          }
        }
      }
    }
    
    Store that in a variable like health_flash_active. Then use an Is Number loading requirement checking health_flash_active > 0. That ensures the overlay stays around for both the flash and the post phase (see the Variables doc for updating/storing values).
#
  1. Slide the overlay via anchor offset
    Anchor the overlay to the top of the real health bar (e.g., Bottom Center of health bar), then use Advanced Positioning → Y Offset with this expression to move it down as the post timer runs:

    {
      "placeholder": "calc",
      "values": {
        "decimal": "true",
        "expression": "-8 + (1 - {"placeholder":"minnum","values":{"first":"1","second":{"placeholder":"calc","values":{"decimal":"true","expression":"({"placeholder":"getvariable","values":{"name":"health_flash_timer"}} + {"placeholder":"getvariable","values":{"name":"health_flash_post_timer"}}) / 10"}}}}) * 24"
      }
    }
    

    This keeps the overlay 8px above the anchor while either timer is zero, then slides it down 24px over 10 ticks (adjust the 10, -8, and 24 to match your visuals). The minnum/maxnum wrapping keeps the ratio clamped between 0 and 1 (see the Placeholders doc for calc, minnum, and maxnum usage).

  2. Extend the post timer if needed
    Increase the first value in your minnum block (the one currently set to 5) to whatever tick count you want the slide to take.

With this, the overlay stays active for both timers, and instead of fading, it translates downward from its anchor as the post timer counts down.

spark rover
#

rebuild this such that i can make the overlay slide down instead of fading after damage is taken and the health flash timer is done

simple nexusBOT
# spark rover rebuild this such that i can make the overlay slide down instead of fading after...

Here’s how to rebuild it so the overlay stays loaded until the post timer ends and then slides down from its anchor instead of fading:

  1. Keep the element alive – replace the current health_flash_timer > 0 loading requirement with one that checks the sum of both timers (so it remains visible during both phases). You can create a helper variable (e.g. health_flash_active) in your script:

    Set Variable Value: health_flash_active:
    {"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"getvariable","values":{"name":"health_flash_timer"}} + {"placeholder":"getvariable","values":{"name":"health_flash_post_timer"}}"}}
    

    Then use an Is Number requirement checking health_flash_active > 0 so the overlay never unloads while either timer runs.

  2. Extend the post timer – in your second IF block (the one shown in the screenshot), bump the minnum first value (currently 5) to the number of ticks you want the slide to take. That controls how long the post phase lasts.

#
  1. Slide the overlay via advanced positioning – anchor the overlay to the health bar (e.g., the same anchor you already use). Then right-click the overlay → Advanced Positioning → set the Y offset to a placeholder-driven expression that moves it down as the post timer counts down. For example:

    {
      "placeholder": "calc",
      "values": {
        "decimal": "true",
        "expression": "-8 + ({"placeholder":"maxnum","values":{"first":"0","second":{"placeholder":"minnum","values":{"first":"1","second":{"placeholder":"calc","values":{"decimal":"true","expression":"({"placeholder":"getvariable","values":{"name":"health_flash_post_timer"}} / 10)"}}}}}}) * 24"
      }
    }
    

    This keeps the overlay 8px above the anchor while the post timer is 0, then smoothly moves it down 24px over 10 ticks (adjust the 10, -8, and 24 to taste). Wrapping with minnum/maxnum ensures the ratio stays between 0 and 1—see the calculator placeholder docs for syntax.

  2. Optional smoothing – if you want the slide to start only after the flash timer hits zero, subtract the flash timer from the post timer in the expression or use a separate variable that only counts the post phase.

Let me know if you’d like the exact expression rewritten to match the tick count you settled on or if you want the slide to “bounce” into place.

spark rover
#

where do i set the variable value for health_flash_active?

simple nexusBOT
# spark rover where do i set the variable value for health_flash_active?

You don’t set health_flash_active in the layout settings itself—you add it to the same action script that already updates health_flash_timer and health_flash_post_timer. While you’re editing that script (right-click the ticker or element that runs the timer logic → Edit Action Script), insert a Set Variable Value action after the timers get updated:

Set Variable Value: health_flash_active:{"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"getvariable","values":{"name":"health_flash_timer"}} + {"placeholder":"getvariable","values":{"name":"health_flash_post_timer"}}"}}

That keeps the variable synced to both timers. Then use the Is Number requirement health_flash_active > 0 on the overlay so it stays loaded while either timer is running. For a refresher on variables and actions, see the Variables documentation.

spark rover
#

can you show me where in the action script to add the new set variable value?

simple nexusBOT
# spark rover can you show me where in the action script to add the new set variable value?

Right after you update both timers in that action script is the perfect spot. In your current flow (shown in screenshot) the timers are set inside the second IF block and the ELSE that resets them. Add the new action right after those lines—i.e. after you Set Variable Value: health_flash_timer… and health_flash_alpha… (and after health_flash_post_timer… if you still want it there). The action should look like this:

Set Variable Value: health_flash_active:
{"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"getvariable","values":{"name":"health_flash_timer"}} + {"placeholder":"getvariable","values":{"name":"health_flash_post_timer"}}"}}

That way health_flash_active always reflects the live duration of both timers, and you can safely use it in the overlay’s loading requirement (health_flash_active > 0). Keep it inside the same IF so it updates every tick alongside the timers.

spark rover
#

please write the whole action script with the new additions highlighted

simple nexusBOT
# spark rover please write the whole action script with the new additions highlighted

Here’s the full script rewritten so the timers stay synced, the post phase can be longer, and the new health_flash_active variable keeps the overlay loaded while either timer is running. I marked the new additions with >> comments since we can’t actually color/highlight the text here:

▶ IF (Is Number: current_player_health_percent < getvariable prev_health_percent AND Is Number: getvariable health_flash_timer = 0)
  └─ Set Variable Value: health_flash_timer: {"placeholder":"getvariable","values":{"name":"health_flash_duration"}}
  └─ Set Variable Value: health_flash_alpha: 1

▶ IF (Is Number: getvariable health_flash_timer = 0)
  └─ Set Variable Value: prev_health_percent: {"placeholder":"current_player_health_percent"}
  └─ Set Variable Value: health_flash_post_timer: {"placeholder":"minnum","values":{"first":"10","second":{"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"getvariable","values":{"name":"health_flash_post_timer"}} + 1"}}}}
▶ ELSE
  └─ Set Variable Value: health_flash_post_timer: 0

▶ Set Variable Value: health_flash_timer: {"placeholder":"maxnum","values":{"first":"0","second":{"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"getvariable","values":{"name":"health_flash_timer"}} - 1"}}}}
▶ Set Variable Value: health_flash_alpha: {"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"getvariable","values":{"name":"health_flash_timer"}} / {"placeholder":"getvariable","values":{"name":"health_flash_duration"}}"}}

>> └─ Set Variable Value: health_flash_active: {"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"getvariable","values":{"name":"health_flash_timer"}} + {"placeholder":"getvariable","values":{"name":"health_flash_post_timer"}}"}}
#
  • health_flash_post_timer now counts up to 10 ticks (adjust first":"10" to whatever length you want for the slide).
  • The final health_flash_active line (the new action) keeps the overlay visible while either timer is >0. Use Is Number: health_flash_active > 0 as the overlay’s loading requirement.
  • The fade expression can now be repurposed for Y-offset instead of transparency if you want it to slide down—just plug health_flash_post_timer into your advanced positioning expression.

Let me know if you want me to rewrite the opacity/position expression to match the sliding motion as well.

spark rover
#

rewrite the position expression

simple nexusBOT
# spark rover rewrite the position expression

Use health_flash_post_timer to drive the overlay’s Y offset so it slides down instead of fading. Anchor the overlay to the health bar, enable Advanced Positioning → Y Offset, and paste this expression:

{
  "placeholder":"calc",
  "values":{
    "decimal":"true",
    "expression":"-8 + ({"placeholder":"maxnum","values":{"first":"0","second":{"placeholder":"minnum","values":{"first":"1","second":{"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"getvariable","values":{"name":"health_flash_post_timer"}} / 10"}}}}}}) * 24"
  }
}
  • -8 keeps the overlay 8px above the anchor while the post timer is 0.
  • The fraction (post_timer / 10) ramps from 0 to 1 over 10 ticks—adjust the 10 and 24 to change how long the slide takes and how far it moves.
  • Wrapping with minnum/maxnum clamps the value between 0 and 1, so the offset won’t overshoot (see calculator placeholder docs for reference).
spark rover
#

the overlay still disappears 1 tick after damage

simple nexusBOT
# spark rover the overlay still disappears 1 tick after damage

It’s still disappearing because the element’s loading requirement is probably still “health_flash_timer > 0”. That requirement unloads the overlay as soon as the flash timer hits zero—even though the post timer (and the new health_flash_active variable) is still running.

Please double-check the overlay’s loading requirement and replace it with something like health_flash_active > 0 (the variable we set to health_flash_timer + health_flash_post_timer). That keeps the element loaded for the entire slide-down phase.

If you want to verify the variable is working, add a temporary Text element that prints {"placeholder":"getvariable","values":{"name":"health_flash_active"}} so you can watch it go from the flash duration down to 0.

For reference on the placeholder/requirement syntax, see the FancyMenu docs (e.g. the Placeholders page).

spark rover
#

the loading requirement is health_flash_active > 0 but the overlay still dissappears

simple nexusBOT
# spark rover the loading requirement is health_flash_active > 0 but the overlay still dissapp...

If the overlay still disappears after one tick even though health_flash_active > 0 is the requirement, then the problem is that the timer script is no longer running once the overlay unloads. The action script that decrements health_flash_timer, increments health_flash_post_timer, and updates health_flash_active must be executed every tick regardless of whether the overlay is currently visible. If that script is tied to the overlay element itself (for example, a Button action or listener that only runs while the overlay is loaded), it will stop as soon as health_flash_active hits zero and the overlay unloads—which is exactly what you’re seeing.

Fix: Put the script inside a separate Ticker element (or any always-running listener) that ticks even while the overlay is hidden. That way the variables keep counting down, health_flash_active stays > 0 for the full duration, and the overlay remains loaded long enough to slide down as intended. You can keep the Is Number: health_flash_active > 0 requirement on the overlay, but the Ticker ensures the value never freezes mid-slide.

If you need help wiring the Ticker or want me to rewrite the scripts for that setup, let me know!

spark rover
#

please wire the ticker and rewrite the scripts

simple nexusBOT
# spark rover please wire the ticker and rewrite the scripts

Here’s how to keep the timers running even when the overlay hides:

  1. Add a Ticker (it runs in the background no matter what elements are visible):

    • Right-click the HUD editor background → New Element → Ticker.
    • Set Tick Mode to Normal (or Every Tick) and Tick Delay to 1.
    • Right-click the ticker → Edit Action Script and rebuild your timer logic there.
  2. Copy your existing script into that ticker:

    ▶ IF (Is Number: current_player_health_percent < getvariable prev_health_percent AND Is Number: getvariable health_flash_timer = 0)
      └─ Set Variable Value: health_flash_timer:{"placeholder":"getvariable","values":{"name":"health_flash_duration"}}
      └─ Set Variable Value: health_flash_alpha:1
    
    ▶ IF (Is Number: getvariable health_flash_timer = 0)
      └─ Set Variable Value: prev_health_percent:{"placeholder":"current_player_health_percent"}
      └─ Set Variable Value: health_flash_post_timer:{"placeholder":"minnum","values":{"first":"10","second":{"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"getvariable","values":{"name":"health_flash_post_timer"}} + 1"}}}}
    ▶ ELSE
      └─ Set Variable Value: health_flash_post_timer:0
#

▶ Set Variable Value: health_flash_timer:{"placeholder":"maxnum","values":{"first":"0","second":{"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"getvariable","values":{"name":"health_flash_timer"}} - 1"}}}}
▶ Set Variable Value: health_flash_alpha:{"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"getvariable","values":{"name":"health_flash_timer"}} / {"placeholder":"getvariable","values":{"name":"health_flash_duration"}}"}}
▶ Set Variable Value: health_flash_active:{"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"getvariable","values":{"name":"health_flash_timer"}} + {"placeholder":"getvariable","values":{"name":"health_flash_post_timer"}}"}}

Because the ticker lives separately from the overlay, `health_flash_active` keeps decreasing even if the overlay is hidden, so the loading requirement (`health_flash_active > 0`) actually stays true for the whole slide.

3. **Double-check the overlay’s loading requirement** still uses `health_flash_active > 0`. That way it stays loaded while the ticker drives the slide.

If you want more detail on editing ticker scripts, the Action Scripts and Ticker docs are helpful: [Action Scripts](https://docs.fancymenu.net/en/action-scripts) and [Ticker element](https://docs.fancymenu.net/en/elements#ticker).
spark rover
#

do i need to remove the timers from the first original ticker?

simple nexusBOT
# spark rover do i need to remove the timers from the first original ticker?

Yes — move the timer logic completely over to the new background ticker and remove it from the old one. You only want one ticker managing health_flash_timer, health_flash_post_timer, health_flash_active, etc., otherwise they’ll conflict. Once the new ticker runs the script every tick, the old one can keep a clean slate (or be deleted) so nothing keeps resetting the timers unexpectedly.

simple nexusBOT
#

✅ | more continuation