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"

Is it possible to directly reference components of other actors in BluePrint?

Hi there, I am new to Unreal but have lots of experience in Unity. I know, it is not the same, but I guess there are ways to achieve the same and I simply do not know how.

So, my question is: Can I set an object reference in the editor to another Actors Component?

I have an Actor BluePrint Goal_BP with a CollsionComponent and another Actor GoalCounter with a GoalCounterComponent_BP ActorComponent. Goal_BP has a public variable of type GoalCounterComponent_BP to call it's methods on collision events (`GoalCounterComponent::OnGoal()`).

alt text

In Unity I would simply drag the Actor GoalCounter, which contains the Component GoalCounterComponent_BP to the variable to reference it there. In Unreal I can click to open a dropdown, but neither the Actor nor it's component shows up.

alt text

I know I can reference the Actor itself and get the component via GetComponentByClass(GoalCounterComponent_BP) which has the issue, that the given actor might not have such a component.

alt text

Whats the proper way to do this? So, how can I achive Picture 1 without doing what I did in Picture 3?

Sorry for the long text and thanks for having a look :)

Product Version: UE 4.19
Tags:
01.png (339.5 kB)
02.png (359.7 kB)
03.png (176.9 kB)
more ▼

asked Mar 07 '19 at 10:11 AM in Blueprint Scripting

avatar image

limbusdev
1 1

(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
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