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 attach actors to your character in multiplayer (with blueprints please)?

How can i attach an actor (f.ex. a knife spawned in the map- by the server) and attach it to the mesh of my custom character for multiplayer? I tried different ways- attachtoActor, attachtoComponent, server side only, with multicast - all of that, but I couldnt find a solution. btw: i also disabled physics and collision and it works for the server only sometimes, but i forgot how i just did that -lol, but never for clients and server. and yes the actor is replicated.

Thank you!

Product Version: UE 4.15
more ▼

asked Jun 12 '17 at 05:58 PM in Blueprint Scripting

avatar image

46 6 10 12

avatar image Jeremy_drn Jun 12 '17 at 05:59 PM

and that should be custom - like ... I dont want to set them as childs in the character itself because i have a lot of weapons and I dont think, that this is very smart (you know- setting them as childs in the char and then just activate them)

avatar image alperenakyuz Jun 13 '17 at 02:02 PM

What exactly is going wrong? Is it not being attached on the client side?

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

2 answers: sort voted first

well i fixed it when calling it on the server and then run multicast and attach the actor

more ▼

answered Jul 06 '17 at 09:48 PM

avatar image

46 6 10 12

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

I took a different approach that is working so far testing with 3 players. I handled the actor spawning inside my Player Controller with custom events.

  1. In the event I spawn the actor and set the return value from the spawn actor as a variable that's replicated. This variable I reference later to get the mesh of the actor I want to attach to the player.

  2. Then I used Get Controlled Pawn for the object to cast to my player's character.

  3. Get the player's mesh from this cast and set that as the parent node for AttachToComponent.

  4. Get the spawned actor reference and get it's mesh. Set this as the target node for AttachToComponent.

more ▼

answered Jan 05 '19 at 10:56 PM

avatar image


(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