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 can I attach a Blueprint to a Socket in another Blueprint?

this is similar but not the same to this https://answers.unrealengine.com/questions/29028/attaching-blueprint-object-to-skeletal-meshes-sock.html

however the above uses the LEVEL blueprint and i want to do this entirely within a single blueprint which isnt a level blueprint?

the closest ive come is to adding the "child actor" in the components tab and this seems to work in the viewport, except the attached blueprint disappears on play/simulate.

thanks

Product Version: Not Selected
Tags:
more ▼

asked Aug 20 '14 at 02:29 PM in Using UE4

avatar image

bennetherwood
189 21 21 34

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

1 answer: sort voted first

Hey Bennetherwood,

As long as you have a reference to the Blueprint you want to attach to your socket, you can use the Attach nodes to accomplish this. Here's an image of a simple setup for your Character Blueprint:

alt text

On whatever event you choose (L Key Event, in this case), it Gets All Actors of Class (choose whichever Blueprint you're looking for in your level), and uses a For Each Loop to Attach Actor to Component. The Array Element is the Blueprint Actor, the In Parent is the Character's Skeletal Mesh, and the In Socket Name is the exact name of the Socket in your Skeletal Mesh.

Hope that helps!

pickupitem.png (84.0 kB)
more ▼

answered Aug 20 '14 at 09:21 PM

avatar image bennetherwood Aug 21 '14 at 09:53 AM

I've tried this method but nothing gets attached, I've tried this on Owen in content examples with no avail, can I clarify if this would work with a blank level ? And does the attached still function like the blueprint or an inanimate version of the blueprint ?

avatar image Ben Halliday STAFF Aug 21 '14 at 03:12 PM

This will work in any level with any Blueprint. If you're using it on something without a skeletal mesh or socket, you can leave In Socket Name blank and it will just attach to the pivot point of the In Parent component.

Would you attach an image of what your setup looks like in Blueprints? Keep in mind that your Get All Actors of Class node is going to search for all Actors of the Actor Class you select that already exist in the game, and it will not work if you haven't already spawned the Actor.

avatar image bennetherwood Aug 21 '14 at 03:19 PM

No I haven't spawned the actor in the world, but this isn't a case of a character maybe picking up a gun blueprint and attaching it to a socket, this is a case of adding a blueprint to another and then being able then drag that blueprint from content browser into the level with another blueprint being attached to a socket, or can this not be done ? Thanks

avatar image Ben Halliday STAFF Aug 21 '14 at 03:27 PM

I'm not sure I understand. Are you trying to do this during gameplay or during editing?

avatar image bennetherwood Aug 21 '14 at 03:29 PM

For Editing.

avatar image Ben Halliday STAFF Aug 21 '14 at 03:46 PM

Ah, okay. What I was showing above is for use during gameplay. If you're looking to attach one Blueprint to another that has a socket, you can use Socket Snapping in the Editor:

https://docs.unrealengine.com/latest/INT/Engine/Content/Types/SkeletalMeshes/Sockets/index.html#socketsnapping

This will only work when attaching to Blueprints that have a Skeletal Mesh with Sockets already created. It will not allow you to drag a Blueprint out with another Blueprint already attached, but it will let you snap it into place pretty quickly.

avatar image bennetherwood Aug 21 '14 at 04:12 PM

I have tried this approach and it works for a skel mesh however for a blueprint with a skel mesh you don't get the option to attach to a specific bone/socket but I don't know why? It just attaches it to the pivot, could this be a big/lack of features ?

avatar image Ben Halliday STAFF Aug 21 '14 at 04:28 PM

Hm, you're right. Let me check in with the developers this afternoon. I'll let you know if we're missing something or if this is something they can fix.

avatar image bennetherwood Aug 21 '14 at 04:38 PM

Thanks man !

avatar image Ben Halliday STAFF Aug 21 '14 at 08:47 PM

I have entered TTP# 344536 into our bug database for this issue so our developers can take a closer look at it. I will let you know when I see an update on this. Thanks for pointing this out to us!

avatar image Ben Halliday STAFF Sep 26 '14 at 06:12 PM

It looks like the socket snapping methods did not consider Blueprint actors. This has been fixed internally and should appear in 4.6. Thanks for your patience!

(comments are locked)
10|2000 characters needed characters left
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