How to override some CharacterMovementComponent code

I find people talking about this stuff all the time, but I have no idea how to do it. (I’ve tried over and over again on test projects, but I just can’t get it.)

I want to modify some C++ code from the CharacterMovementComponent, but rather than doing it in the engine code, I want to create my own “CustomCharacterMovementComponent” that inherits from the original CharacterMovementComponent and overrides the functions I want it to. And then have my character use that component instead.

I’ve heard that in order to do this, my character needs to be using “FObjectInitializer constructor.” But unfortunately, I’m not very sure how to do any of this.

Please, if someone could provide a complete step by step guide to all of this… Because this is a very common question that doesn’t seem to have a clear answer.

(Oh, and by the way, I don’t know if this matters or not, but my project was created with the “Blueprints template,” and I’d rather not have to change that.)