Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.



Product Version: UE 4.8
more ▼

asked Jul 08 '15 at 09:13 PM in Bug Reports

avatar image

67 12 14 17

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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!

Matthew Clark

more ▼

answered Jul 09 '15 at 08:14 PM

avatar image ckchessmaster Jul 13 '15 at 07:36 PM

Ahh ok I see that makes sense, thanks!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question