How can I resolve the error "Can't override a 'Final Function'"?

I’m just mucking around in C++ to prototype something, and while I do have some C++ experience I am fairly new to it and UE as a whole.

I’m attempting to override the CanJump() function from Character.h/Character.cpp to create a character who can double jump in ShooterGame. However, when attempting to override CanJump() in the header like so…

virtual bool CanJump() const OVERRIDE;

Visual studio says “error C3668: ‘AShooterCharacter::CanJump’ : method with override specifier ‘override’ did not override any base class methods”.

And so I assumed that this was because I did not declare the override as a UFUNCTION. However, when I attempt to override it like so…

UFUNCTION(BlueprintCallable, Category = "Pawn|Character")
virtual bool CanJump() const OVERRIDE;

The following error is received: “error : In ShooterCharacter: CanJump: Can’t override a ‘final’ function”

Is CanJump() simply not overridable, or am I doing something horrendously wrong? I don’t see anything that designates it as ‘final.’ Google searching turns up a similar question that was asked, but the answer left this point ambiguous.

Thanl you very much. I apologize for how bad I am at this.

i’m not 100% sure but const in this case it’s same as final can’t final function can’t be overrided.

But i looked on engine source code and CanJump() from character is only used in one point which is DoJump() function to check if character can jump (CanJump() do check if character is ground and so on), you could override DoJump() for your custom CanJump() behavior :slight_smile:

Here you got link to source code can check up those functions, remeber that you need to be active subscriber, be login and have github accound tied to you Unreal profileto be able to see engine source code

https://github.com/EpicGames/UnrealEngine/blob/35d8b371a10392565bfc68ddb6f9b52aa3ba4bbf/Engine/Source/Runtime/Engine/Private/Character.cpp#L189

I think read you question and asked Epic more directly :stuck_out_tongue: epic respond why they made it final and also propose different approach to workaround this:

Excellent! It works fine and I’ve been able to implement double-jump using your answer. Thank you very very much! I really appreciate it.