Alright, let’s try a different mechanic that doesn’t touch masks or extra images.
Goal
You want the shine to visually shrink toward the center once health drops below 50%. Instead of editing width directly, we’ll do it by overlaying two shine layers and switching their opacity/position:
Step 1: Keep your original shine (full width)
- This stays untouched and always renders full-width under everything.
Step 2: Add a second shine overlay
- Create a new Image (call it
Shine Clip), anchored to the same health bar.
- Point it to the same texture as the shine.
- Set it to blend mode = Multiply/Alpha (so it can act like a fading mask).
- Turn “Render Behind” on if needed to keep it layered correctly.
Step 3: Drive its opacity via calculator
Use this expression so the overlay fades in only when health drops under 50% (acting like a shrinking highlight around the center):
{"placeholder":"calc","values":{
"decimal":"true",
"expression":"{"placeholder":"current_player_health_percent"} >= 50 ? 0 : 1 - {"placeholder":"current_player_health_percent"} / 50.0"
}}
This makes the overlay gradually appear as health goes from 50% → 0%, leaving the original shine showing only in the middle.
Step 4: Offset the overlay’s position
Have the overlay match the shine’s center so the alpha buildup happens from both sides. Use this expression for its X position:
{"placeholder":"calc","values":{
"decimal":"true",
"expression":"{"placeholder":"elementposx","values":{"id":"6e9bfa9a-63f5-468f-afa3-d76f484d5233-1772710991717"}} + ({"placeholder":"elementwidth","values":{"id":"6e9bfa9a-63f5-468f-afa3-d76f484d5233-1772710991717"}} - {"placeholder":"elementwidth","values":{"id":"6e9bfa9a-63f5-468f-afa3-d76f484d5233-1772710991717"}} * ({"placeholder":"current_player_health_percent"} / 100.0)) / 2"
}}
This slides the overlay slightly toward the center as health drops, mimicking a shrinking effect.