Parent and Inheritance from child.

Heyo,

I have 2 classes. One parent, one child.

I have a blueprint that casts to the parent to set a variable to be true. If I play as the child class, how can I make the cast to the child, without having a cast to the parent, and the child.

So basicly, is there a node that can cast to all classes of a parent(and so including the child classes) including the parent too?

Thanks,
Alexander

A cast to the parent covers all children

So just to confirm,

If I wish to Dock, and I’m playing as a child actor, that cast to the parent, still allows me to dock as the child actor?

if the Boolean “Able to Dock?” exists on parent, all the children has it, so you don’t need to use a parent cast on children to set “Able to Dock?”.

Right okay. Since my second comment, I’ve tested this now and it does work. Thanks for the information.