How to access a variable on multiple characters in another blueprint?
I have a blueprint which activates on 'actor begin overlap'. Every character will have a FollowCamera component/variable. I am able to get my blueprint to work when I cast to any specific character blueprint, but I don't know how to let it activate if I go to world settings > GameMode Override and select a different game mode which uses another character.
In this example the dark knight character is my playable character so the blueprint works. If I change the game mode to the default with the HeroTPP on the example map, the blueprint doesn't work. Is there a way to access the FollowCamera component/variable from any character blueprint?
If you want multiple character classes with shared functionality, such as a FollowCamera component, you'll want to make a base character class. Then, make the different character classes for each of your game modes inherit from your base class. In your example above, you'd be able to cast to that base class and access FollowCamera, regardless of your character class.
In the content browser, you can make a child class of a blueprint by right-clicking and selecting "Create blueprint based on this." Alternatively, you can go to the Blueprint Props of an existing blueprint, and change the Parent Class.
Hope that helps!
answered May 06 '14 at 11:04 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here