x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

alt text

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?

Product Version: Not Selected
Tags:
example1.png (219.8 kB)
more ▼

asked May 02 '14 at 03:49 AM in Blueprint Scripting

avatar image

Kavas
1 3 6 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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!

-Nick

more ▼

answered May 06 '14 at 11:04 PM

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question