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
asked Feb 01 '19 at 05:05 AM in Blueprint Scripting
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.
Follow this question
Once you sign in you will be able to subscribe for any updates here