This is, because you construct the path in the constructor of the component and you never update it.
A solution is, to move it into the paint, so it is always updated when paint is called.
Don’t forget to call
internalPath1.clear(); before refilling the path.
Then you might have to trigger the repaint from a timer, or any other callback, that could indicate, that your value has changed (e.g. a Slider::Listener to attackValue).
I would have provided corrected snippets, but I can’t copy and paste from your screenshots. Hence it is better to use markup to copy code into your posts, add three backticks
``` on a single line before and after the code you copy into the post:
// your code here
For your compiler error it would be helpful, if you could show the actual error message (here a screenshot would be ok, so it’s nicely formatted from your IDE)