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 do I reference a component from one blueprint to another?

I am attempting to script a simulation for VR. I have two parts that I need to assemble together. Both parts are blueprints that have sphere components with sockets attached to them so when they overlap they will snap together. Pictured is what I have, how do I reference the Pipe Sphere in my Brake Sphere blueprint?alt text

Product Version: UE 4.21
Tags:
1.jpg (48.9 kB)
more ▼

asked Mar 06 '19 at 05:02 PM in Blueprint Scripting

avatar image

daily_walrus
1 1 1

avatar image Nebula Games Inc Mar 07 '19 at 05:14 PM

Check out the first video on "Casting" and video #25 on "Creating References". I think they will help you understand what you need to do. For a "component" reference you would just need to type in the name of the component once you have a reference to the parent BP instead of the variables I pull out in the videos.

https://www.youtube.com/playlist?list=PLyu-W38DvZhqByAoeva1jewB5s78zQHIy

avatar image daily_walrus Mar 08 '19 at 06:12 PM

These videos are a huge help, the casting video alone solved my problem. Thanks again!

avatar image Nebula Games Inc Mar 08 '19 at 10:51 PM

Glad the videos were helpful :)

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

2 answers: sort voted first

The most obvious way: you can use OtherActor and OtherComponent inputs of the event to access the other actor that has overlapped with this one. You can cast these parameters to Brake Sphere and get the Pipe Sphere component.

more ▼

answered Mar 06 '19 at 05:19 PM

avatar image

KristofMorva
1.4k 5 5 7

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

You have 2 options

  1. Cast the object you want example: Cast To FirstPersonController and get the values.

  2. Make a variable and reference that variable to the object you want then you can drag the variable you make into the blueprint and you have the reference.

if you want more examples or screenshot Tell me.

more ▼

answered Mar 07 '19 at 01:20 PM

avatar image

THT_Nick
19 1 2 3

avatar image daily_walrus Mar 07 '19 at 01:27 PM

a screen shot would be great, im still learning

avatar image THT_Nick Mar 07 '19 at 02:56 PM

Hope this helps you :) https://imgur.com/a/799Ntt5

avatar image daily_walrus Mar 08 '19 at 06:13 PM

thanks for taking the time to educate me, much appreciated

(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