Have a loop designed to loop from 0 to 1 when the bar is full (so at half health, loop to 0.5). At each such step, use

**path_get_x** and

**path_get_y** to get the path position for the loop value. (Subtract its value for position 0 to get a value that's independent on where the first point is located in the editor). Draw a small "segment" sprite at this position.

Now, there's a whole bunch of kinks left to iron out in this. First of all, the shape of the segment sprite. Circles would be nice, since they have the best coverage, but this will give clear rounded edges. Let's consider a rectangle of width 1 and height equal to the bar's... uh, "acrossicord" instead, with its origin in the

**center right**.

What's so special with this shape? It will face the direction of the path, but if we draw it with an image_xscale > 1, it will stretch

*backwards*. We want to do exactly that: stretch it with the distance between two points on the path. Since it's 1 pixel, you can stretch it by the distance, and it will match perfectly.

Now, we actually need to stretch it more than that sometimes, because of the outer edge of a corner being further away from the previous' point's counterpart than the center point is. This creates a gap.

This gap will be at most

**the square root of 2** larger than the side of the distance from the center point to the outer point of the bar (so acrossicord / 2 * sqrt(2) = acrossicord/sqrt(2) = acrossicord/1.4), if you're lazy you could just always stretch it with this value (precomputed as a constant for speed) instead of computing it based on the angle.

Finally, the sprites might look a bit like a patchwork of rotated sprites, because that's why it is. You could solve that by have the segment sprites be pure white, and then use a shader or some blend mode trickery to project a nicer texture onto them.