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…
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
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