Virtual inherit

I create a class inherit Actor like the pitcure.

the class has more property, like health, score etc…
Then I want to create another class inherit Pawn. Because I want this class has AI.
But I want the new class inherit AVRCrossbowsMonsterActor at the same time。

I can’t write class A : public AVRCrossbowsMonsterActor, public Pawn
Because Pawn is inherit Actor.

How do I do? hope friends find a solutions.

You can’t because APawn and AVRCrossbowsMonsterActor both inherits from AActor, it’s called the “diamond problem”, just make AVRCrossbowsMonsterActor inherit from APawn. Or you can write AI for class A.

thank you ! I create a interface class and put all sharing function in the class, Then I create another class put
all sharing property in the class.