Inheritance in BP: Parent BeginPlay Event not executed

Hi there,

I have set up three Blueprints: my “basicAIController”, who is the parent class of my “characterAIController” and my “NPCAIController”. Every Childs BeginPlay Event executes first it’s parents BeginPlay event.

In my Parent, “basicAIController”, I am getting references that are needed for both childs, like game mode, player controller or the POSSESED PAWN (which should be the pawn of the children). When I access the reference of the possed pawn in my children, I get told that the variable is empty.

For Debuging, I have put a print string into my parent, NPC and Char controllers BeginPlay Event. In theory, every controller should print once the message from the parent and one from itself, but when I start the game, the parent message is only printed ONCE. Why does that happen?

Can you post a screenshot of your three blueprints?

Make sure the child blueprints are calling their super’s (parent) BeginPlay in their blueprint.

I guess parent’s BeginPlay is not called as default. Try it like this:

This, 15s late, though.

This is the first, parent BP, “basicAIController”

First child: “characterAIController”

Second child: “NPCAIController”

As mentioned in the original post, the parent events are also called… thats why I’m confused…

As mentioned in the original post, the parent events are also called… thats why I’m confused…
You can see it in the pictures of my BPs I have added above :slight_smile:

Have you thrown a breakpoint in basic’s beginplay to see if the pawn cast succeeds?

Oh well, it looks like the cast fails three times… pretty dumb of me not to check it :0
Now I find out why it fails, but thats another topic… thanks for your help and time! :slight_smile: