OnPossess not overrideable in AIController

Hey so I just recently updated to 4.8 and I noticed that when I compile my code it give me an error saying that there is no such function to override. Essentially i’m trying to override the OnPossess function from AIController so that I can do some things after my unit is possessed. I’m not sure if this is intentional (and if it is what should I be doing differently?) but the fix is pretty easy all I have to do is change the line in AIController.h from: void OnPossess(APawn PossessedPawn);* To: virtual void OnPossess(APawn PossessedPawn);* this allows it to compile like it did back in 4.7.

Thanks,

ckchessmaster

Hi JustygianGames,

The reason OnPossess is no longer virtual is due to it being a BlueprintImplementableEvent. Implementable events are not intended to be overridden in code and are simply meant to react to events, such as something being possessed in this case. The fact of it being virtual previously was something that was not intentional and was recently fixed. As an alternative to using OnPossessed(), you should be able to accomplish the same result by overriding Possess() to cause the possession of the pawn and apply the same logic from your OnPossessed() override inside the body of Possess() instead.

Hope this helps!

Ahh ok I see that makes sense, thanks!