Error C3248: 'AController::Possess': function declared as 'final' cannot be overridden by 'Aenemy_npc1_ai_controller::Possess'

i was coding character npc that will follow player character but now i’m having possess error and i can’t fix it

compiler error log:

C:\Users\j3lly\Documents\GitHub\UnrealEngine\Engine\Source\Runtime\Engine\Classes\GameFramework/Controller.h(266): note: see declaration of ‘AController::Possess’
C:\Users\j3lly\Documents\Unreal Projects\death_show\Source\death_show\enemy_npc1_ai_controller.h(25) : error C3248: ‘AController::Possess’: function declared as ‘final’ cannot be overridden by ‘Aenemy_npc1_ai_controller::Possess’

according 2 [this][1] ue4 documentation link, u include possess with:

#include “Runtime/Engine/Classes/GameFramework/Controller.h”

i did that but it doesn’t work

here’s my code:



i’m using ue4.23 compiled from source code

could some1 please help me out? :<

Since 4.22 it’s deprecated, you should use new methods for Possess / Unpossess:

void OnPossess(APawn* InPawn) override;
void OnUnPossess() override;

For the details, look into the Engine\Source\Runtime\Engine\Classes\GameFramework\Controller.h:266

1 Like