How to get a Street Fighter-like health bar?

Don’t use return in a void function. That’s bad code design.
Just negate the if statement:

if (this->target_percentage != percentage)
{
    // do your stuff
}
1 Like

Didn’t know that, thanks.

May you want to read this:

good idea @iQD :smile: