Download

Parent Class Blueprint Function

Is there a tutorial how to Parent a Blueprint to C++? I have my blueprints that do different functions like climbing ledge and a jetpack. I have attached the Blueprint to my SCharacter which is a C++ class that controls the functions of my main game character. Is there an extra step after parenting the blueprint to my C++ class to activate the functions of the Child Blueprint? I have attached a screenshot of my blueprint and how it is parented.

6d1979b2a6e4260d086f349c7b6472388b12a836.png

I don’t get what you want. Are the inputs not working because the C++ Parent class is blocking them? Or what is the problem?

I have a ledge climbing system that is used by another Blueprint Character. I am trying to combine the Blueprint to my main Player Character. My SCharacter is able to shoot and use pickups and I want to merge the Ledge Climbing Blueprint to have my Character use the functions of the ledge climbing system without having to Merge the Blueprints together. I read you can Parent one blueprint to another and the Parent will inherit the Properties of the Child Blueprint. I have parented the Ledge Climbing System with my SCharacter but I don’t see anything happening after I parent my Ledge Climbing system to the Parent Scharacter. Do I need to add a script in my Construction Script or my Event Graph in my Parent Blueprint in order to use the Child Blueprint functions?

The PlayerPawn is the Spawn of the C++ class Scharacter

This is my Main Character C++ Class
e0b598c4d79eb7fd9a121d2cb21c786b797ee075.png

This is the Main Player Character that uses the Scharacter C++ Class
ed4b3aa14accfdf795c3faa6acc08aba036d38cb.png

This is the Ledge Climbing Blueprint I want to Combine
5a8ee0c4af4e01f1587b5437c5c6e5b5a51852ea.png

Here is the Blueprint Screen for main Character Using the SCharacter Class in the Blueprint Class Settings
1d6a8a5593fcbb9e244a6ec0717c11ddbb9832fe.jpeg

It’s the other way round. The Child gets the functions of the Parent. Also you can only have Blueprint inherit from other blueprints or C++. You can’t have C++ inherit (be a child class) of a Blueprint class.

And no, after you selected the parent class, you can access the functions and variables of the Parent class by just searching for them or clicking on the Eye symbol on the left and also show inherited variables.

If SCharacter is a C++ class, then you need to use specific UPROPERTY and UFUNCTION marcros in front of your variables and functions so that they can be seen and used in Blueprint child classes.