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"

Event Beginplay Function multicast problem

Hi, in my character blueprint, I spawned 2 cube in event Beginplay, and my character has a cable, after spawned a cube, I want my character·s cable attach end to spawned cube, problem is: when I start my game, only server side can see the character·s cable attached to spawned cube.What should I do to make every player can see the cable is attached to spawned cube?alt text

alt text

alt text

alt text

alt text

Product Version: UE 4.20
2019212.png (100.6 kB)
2019213.png (985.9 kB)
2019214.png (919.5 kB)
2019215.png (87.5 kB)
2019216.png (150.4 kB)
more ▼

asked Feb 01 '19 at 05:05 AM in Blueprint Scripting

avatar image

35 1 1 5

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

1 answer: sort voted first
  1. Remove the Multicast, you don't need it. Do the attaching of cable in the Server side. As long as the cable and the object it is attaching to is replicated it will be replicated to clients.

  2. You are attaching on the client side on the replicated variable Cube. The problem is, the Cube is probably not been replicated yet until the next few frames. There are 2 ways to fix this:

a. Use RepNotify and attach the cable inside the RepNotify event. This way you can be sure that the Cube is replicated on the client. But do this on Server call so the Server knows it.

b. OR pass the Cube as a parameter for a Server call. But then you have to move your AttachCableToEnd node inside your SpawnACube node so you can pass the object right after creating it. Then you don't have to wait for the next replication frame to happen.

So in summary, you have 2 problems to deal with: 1) The cube isn't replicated yet on the client and 2) You are (re-)attaching the cable on the client side so the Server won't know it.

more ▼

answered Feb 01 '19 at 05:36 AM

avatar image

1.2k 8 4 8

avatar image windlox Feb 01 '19 at 06:06 AM

Thank you, you are awesome!This promble botthed me in past 3 day!

(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