I suggest you take a look at the following tutorial:
Unreal Engine Wiki - First Person Shooter Tutorial
It goes through creating a character class that is in your own project, rather than editing the UE4 source directly, which could reduce compile time due to only having to compile your project and not the whole engine each time.